写在前面思路分析数组couple[i] = j表示i的对象是j。初始化-1数组isExist表示某人对象是否来派对所有isExist不为1的⼈,
原创 2022-08-23 15:48:17
80阅读
一、内容题意: ab % c 1<= a, b, c<=2 63二、思路利用高精度的快乘三、代码#include <cstdio>typedef long long ll;typedef unsigned long long ull;ll a, b, c;ll mul(ll a,ll b, ll MOD){ ll ans = 0; while ...
原创 2021-08-27 14:32:15
144阅读
一、内容 题意: ab % c 1<= a, b, c<=2 63 二、思路 利用高精度的快乘 三、代码 #include <cstdio> typedef long long ll; typedef unsigned long long ull; ll a, b, c; ll mul(ll a,ll b, ll MOD){ ll ans = 0; while ...
原创 2022-02-03 10:59:49
33阅读
容量足够大 服务不能中断 处理性能足够强 Scale up:向上扩展,将当前的机器扩展为更强的计算机 scale out:向外扩展,即集群 cluster: &#160;&#160;&#160; 1负载均衡集群(LB Cluster):LVS &#160;&#160;&#160; 2高可用集群(HA Cluster):heartbeat,corosync
原创 2012-11-21 14:20:30
599阅读
1 class Solution: 2 def canDivideIntoSubsequences(self, nums: 'List[int]', K: int) -> bool: 3 return len(nums) >= K * max(collections.Counter(nums).values()) 数学问题,出现频率最多的数字,一定会被分到不
转载 2019-07-14 00:50:00
16阅读
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can
转载 2020-04-23 17:34:00
87阅读
1121. Damn Single (25)时间限制300 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue"Damn Single (单身狗)" is the Chinese nickname fo
原创 2022-08-30 10:27:39
35阅读
题目题意: 先给定n对情侣,再给出参加派对的人,问派对上有多少
原创 2023-06-27 10:15:40
43阅读
1121 - Reverse the lights Time Limit:2s Memory Limit:256MByte Submissions:376Solved:111 1121 - Reverse the lights Time Limit:2s Memory Limit:256MByte
转载 2017-08-06 15:53:00
46阅读
2评论
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can
转载 2019-02-28 21:58:00
32阅读
实体导入策略 关系较少实体 先导入一些关系较少的实体:朝代,牌
原创 2022-09-23 18:16:17
91阅读
"Damn Single (单身狗)" is the Chinese nickname for someoinpu...
原创 2023-05-18 14:21:27
31阅读
#include<iostream> //DP#include<stdio.h>using namespace std;int dp[31]={1}; //0的时候就是不放置,是1...int main(){ for(int i=2;i<=30;i+=2) { dp[i]=3*dp[i-2]; //在3x2矩阵中可以有3种放置方法,表示[i-2,i]不与前面相连接,单独拼凑成 for(int j=0;j<=i-4;j+=2) dp[i]+=2*dp[j]; //当j=i-4,i-6...时,表示[i-4,i],[i-6,i]...是连接在一起的,无法分割,各
转载 2011-07-05 02:30:00
45阅读
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can
转载 2018-03-02 11:57:00
49阅读
水题~。 const int N=1e5+10; map<int,int> mp; bool vis[N]; int a[10010]; int n,m; int main() { cin>>n; for(int i=0;i<n;i++) { int a,b; cin>>a>>b; mp[a]=b,
转载 2021-02-18 10:59:00
34阅读
http://www.ifrog.cc/acm/problem/1121 我看到这些翻转的题就怕,可能要练下这些专题。
原创 2022-10-20 11:25:14
26阅读
PAT 1121 C++版1.题意给出几对情侣id;再给出一组查询id,问有多少人单身,分别是哪些人?2.分析使用map存储情侣,存储的原则是,id小的作为key,id大的作为value使用set存储查询id,【这里使用到了set的 特点:去重复,有序】遍历set中的元素,查看每一个元素是否在map中存在。如果存在,则验证相应的value是否在set中存在,如果存在,则表明非单身;反...
原创 2022-01-26 10:24:03
104阅读
什么是对象数组它是一个对象的容器它里面存放许多的对象每个对象都可以具有属性和方法与普通数组的区别对象数组可以存自定义对象普通数组存基本数据类型对象数组的定义类名[] 变量名 = new 类名[长度]对象数组中的方法调用遍历调用每一个数组成员的方法for(int i=0;i<对象数组.length;i++){ 对象数组[i].方法名()}...
1121 Damn Single (25 point(s))"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken c
原创 2022-09-15 10:55:36
31阅读
PAT 1121 C++版1.题意给出几对情侣id;再给出一组查询id,问有多少人单身,分别是哪些人?2.分析使用map存储情侣,存储的原则是,id小的作为key,id大的作为value使用set存储查询id,【这里使用到了set的 特点:去重复,有序】遍历set中的元素,查看每一个元素是否在map中存在。如果存在,则验证相应的value是否在set中存在,如果存在,则表明非单身;反...
原创 2021-07-08 11:38:39
85阅读
  • 1
  • 2
  • 3
  • 4
  • 5