摘要: 代码 #include <iostream> #include <cstdio> using namespace std; long long a[1001]; int main() { for(int i=0;i<1000;i++){ a[i]=0; } long long n,m; long l 阅读全文
posted @ 2022-07-14 11:26 qwasdasd 阅读(19) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int main() { int m; int a; int tmp; int tmp3; int tmp4; int tmp5; int 阅读全文
posted @ 2022-07-14 10:46 qwasdasd 阅读(23) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; string a[100001]; string b[1001]; int main() { int n,m; int k; string 阅读全文
posted @ 2022-07-14 10:13 qwasdasd 阅读(19) 评论(0) 推荐(0)
摘要: 注意点 浮点数不能用“==”判断是否相等,需要用abs(x1-x2)<=0.00001的方式 代码 #include <iostream> #include <cstdio> #include <string> #include <cmath> using namespace std; const 阅读全文
posted @ 2022-07-13 18:40 qwasdasd 阅读(27) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int a[20000]; int main() { int n; int cnt=0; cin>>n; for(int i=0;i<200 阅读全文
posted @ 2022-07-13 14:35 qwasdasd 阅读(31) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> #include <map> #include <set> #include <utility> #include <vector> #include <algorithm> usi 阅读全文
posted @ 2022-07-13 14:29 qwasdasd 阅读(33) 评论(0) 推荐(0)
摘要: 注意点 bool cmp_diy(const pair3& a,const pair3& b){//const xxx & x 作用是引用某个变量,只读它的内容,但不能修改这个引用的变量 代码 #include <iostream> #include <cstdio> #include <strin 阅读全文
posted @ 2022-07-13 14:24 qwasdasd 阅读(20) 评论(0) 推荐(0)
摘要: 易错点 测试点4超时 解决方案 tmps=tmps+tmpc+to_string(tmp); 改成 tmps+=tmpc+to_string(tmp); 原因 a+=b比a=a+b快很多! 因此+=的形式不仅仅是代码书写习惯的问题,关系到代码运行速度,可以尽量写成+=的形式。 代码 #include 阅读全文
posted @ 2022-07-13 13:09 qwasdasd 阅读(22) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <cmath> using namespace std; int r[10001]; int main() { int n; int a; for(int i=0;i<10001;i++){ r[i] 阅读全文
posted @ 2022-07-13 12:24 qwasdasd 阅读(14) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <cmath> #include <string> using namespace std; int main() { int n; string id; float x,y; float p; fl 阅读全文
posted @ 2022-07-13 12:18 qwasdasd 阅读(25) 评论(0) 推荐(0)