摘要:
易错点 题干背景中“独一无二颜色的那个像素点”,指出了颜色需要唯一的条件,即颜色值有重复的点并不算是符合要求的点,但是表达并不明确,和输入格式要求“如果这样的点不唯一,则输出 Not Unique”这句话容易混淆,输入格式要求这句话指的是如果有多个符合要求的点,则输出Not Unique。 代码 # 阅读全文
posted @ 2022-07-11 23:57
qwasdasd
阅读(62)
评论(0)
推荐(0)
摘要:
易错点 审题!题干中指出输入不包含空格,但没有对输出做出更多说明,因此不能想当然认为输出不包含空格,必须考虑输出包含空格的情况! 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int m 阅读全文
posted @ 2022-07-11 22:19
qwasdasd
阅读(43)
评论(0)
推荐(0)
摘要:
易错点 这道题用cin会超时,scanf比cin快! 代码 #include <iostream> #include <cstdio> #include <set> #include <string> using namespace std; string x[100000]; int main() 阅读全文
posted @ 2022-07-11 21:44
qwasdasd
阅读(28)
评论(0)
推荐(0)
摘要:
易错点 如果变量是整数且需要输出时,要注意如“00001”这样的数前面的0是不能舍去的 代码 #include <iostream> #include <cstdio> #include <set> #include <string> using namespace std; string x[10 阅读全文
posted @ 2022-07-11 21:08
qwasdasd
阅读(30)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <string> #include <set> using namespace std; int main() { int n; string a; int tmp; set<int> st; cin 阅读全文
posted @ 2022-07-11 20:25
qwasdasd
阅读(16)
评论(0)
推荐(0)
摘要:
注意点 开方用到cmath 代码 #include <iostream> #include <cstdio> #include <cmath> #include <iomanip> using namespace std; int main() { int n; int a,b; float tmp 阅读全文
posted @ 2022-07-11 19:37
qwasdasd
阅读(40)
评论(0)
推荐(0)
摘要:
易错点 测试点1:审题务必仔细!题干中没有说明N1/M1 和 N2/M2的大小,容易认为N1/M1小于 N2/M2,但可能有N1/M1大于 N2/M2 测试点2:注意遍历的方法,以免运行超时 测试点4:查找分母和分子的公因数的时候,须考虑分母可能是分子的倍数 关键 找可能的分子 判断两个数是否互质 阅读全文
posted @ 2022-07-11 19:25
qwasdasd
阅读(172)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; long a[100002]; bool cmp1(long a,long b){ return a>b; } int main() 阅读全文
posted @ 2022-07-11 15:45
qwasdasd
阅读(19)
评论(0)
推荐(0)
摘要:
易错点 每天的骑车距离最大为1的情况下,爱丁顿数 E为0 代码 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; long a[100002]; bool cmp1(long a,long 阅读全文
posted @ 2022-07-11 15:34
qwasdasd
阅读(52)
评论(0)
推荐(0)
摘要:
注意点 判断素数问题 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int ran[10001]; int natu[10001]; bool nat(int a){ if(a%2==0 阅读全文
posted @ 2022-07-11 13:30
qwasdasd
阅读(29)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> #include <string> using namespace std; string s[102]; int point[102]; int count[102]; int rcount[102]; int st 阅读全文
posted @ 2022-07-11 12:59
qwasdasd
阅读(25)
评论(0)
推荐(0)
摘要:
关键 二进制的算法 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int main() { string s; int cnt=0; int zcnt=0,ocnt=0; getline 阅读全文
posted @ 2022-07-11 12:20
qwasdasd
阅读(27)
评论(0)
推荐(0)
摘要:
代码 #include <iostream> #include <cstdio> using namespace std; int main() { int n; int a; int cnt=0; cin>>n; for(int i=0;i<n;i++){ cin>>a; cnt+=a*11*(n 阅读全文
posted @ 2022-07-11 12:00
qwasdasd
阅读(30)
评论(0)
推荐(0)
摘要:
关键 双端队列的使用 数值和字符串的相互映射(有重复值) 代码 #include <iostream> #include <cstdio> #include <string> #include <set> #include <deque> #include <algorithm> using nam 阅读全文
posted @ 2022-07-11 11:50
qwasdasd
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号