Loading

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: A - Already 2018 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; string s; int main(){ cin>>s; s[3] = '8'; c 阅读全文
posted @ 2021-02-09 08:46 dyhaohaoxuexi 阅读(55) 评论(0) 推荐(0) 编辑
摘要: A - Product #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b; int main(){ cin >> a >> b; if ((a * b) 阅读全文
posted @ 2021-02-09 00:51 dyhaohaoxuexi 阅读(48) 评论(0) 推荐(0) 编辑
摘要: A - Buying Sweets #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b, x; int main() { cin >> x >> a > 阅读全文
posted @ 2021-02-08 08:40 dyhaohaoxuexi 阅读(73) 评论(0) 推荐(0) 编辑
摘要: A - Infinite Coins #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int n, a; int main() { cin >> n >> a; if 阅读全文
posted @ 2021-02-07 22:09 dyhaohaoxuexi 阅读(96) 评论(0) 推荐(0) 编辑
摘要: A - Grouping 2 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int n; int main(){ cin >> n; cout << n / 3 << 阅读全文
posted @ 2021-02-07 19:32 dyhaohaoxuexi 阅读(116) 评论(0) 推荐(0) 编辑
摘要: A - Diagonal String #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; char a[3][3]; int main() { for (int i = 阅读全文
posted @ 2021-02-06 17:06 dyhaohaoxuexi 阅读(59) 评论(0) 推荐(0) 编辑
摘要: A. Space Navigation 大意: 给出一个字符串,代表飞船从原点开始的前进方向,问能否经过删掉几个字符,使得飞船最终能够到达$(x,y)$点 思路: 直接算横纵方向上能达到的最远点即可 #include <bits/stdc++.h> using namespace std; type 阅读全文
posted @ 2021-02-06 02:56 dyhaohaoxuexi 阅读(35) 评论(0) 推荐(0) 编辑
摘要: A - Traveling Budget #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b, c, d; int main(){ cin >> a >> 阅读全文
posted @ 2021-02-05 12:25 dyhaohaoxuexi 阅读(63) 评论(0) 推荐(0) 编辑
摘要: A - abc of ABC #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; char a[5]; int main() { for (int i = 0; i < 阅读全文
posted @ 2021-02-05 11:11 dyhaohaoxuexi 阅读(66) 评论(0) 推荐(0) 编辑
摘要: A - Cats and Dogs #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b, c; int main(){ cin >> a >> b >> 阅读全文
posted @ 2021-02-05 00:40 dyhaohaoxuexi 阅读(61) 评论(0) 推荐(0) 编辑
摘要: A - Something on It #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int sum = 700; int main() { string s; c 阅读全文
posted @ 2021-02-04 23:43 dyhaohaoxuexi 阅读(86) 评论(0) 推荐(0) 编辑
摘要: A - Day of Takahashi 输入a b,问从1月1号到a月b号有几天是月份和日期相同的 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b; 阅读全文
posted @ 2021-02-04 19:33 dyhaohaoxuexi 阅读(95) 评论(0) 推荐(0) 编辑
摘要: A - Colorful Transceivers 给出abcd四个数,abc都是一维坐标,问a能否和c直接或间接联通,坐标差值在d以内的可以直接联通 直接模拟即可 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; 阅读全文
posted @ 2021-02-04 08:27 dyhaohaoxuexi 阅读(96) 评论(0) 推荐(0) 编辑
摘要: A - Add Sub Mul 输出加减乘的最大值 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b; int main(){ cin >> a >> 阅读全文
posted @ 2021-02-03 23:47 dyhaohaoxuexi 阅读(96) 评论(0) 推荐(0) 编辑
摘要: A. Three Pairwise Maximums 大意: 给出三个数xyz,问能否找到3个数abc,使得$x=max(a,b), y=max(a,c) ,z=max(b,c)$ 思路: 如果任意两个数的最大值都相同,那么有解,否则无解 #include <bits/stdc++.h> using 阅读全文
posted @ 2021-02-03 19:07 dyhaohaoxuexi 阅读(60) 评论(0) 推荐(0) 编辑
摘要: kuangbin带你飞 专题五 并查集 POJ 2236 Wireless Network 大意: 给出n个电脑的坐标,一开始都是坏的,现在有两个操作,一个是修理坏的电脑,一个是测试修好的电脑的连通性 距离是d以内的电脑可以直接通信,距离大于d的也可以通过可以直接通信的电脑间接通信 要求输出每次测试 阅读全文
posted @ 2021-02-03 11:14 dyhaohaoxuexi 阅读(102) 评论(0) 推荐(0) 编辑
摘要: A - ABD 大意: 输入1-999就输出ABC,否则输出ABD #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int n; int main(){ cin >> 阅读全文
posted @ 2021-02-02 09:32 dyhaohaoxuexi 阅读(105) 评论(0) 推荐(0) 编辑
摘要: A - Happy Birthday! 大意: 一个蛋糕分为16份,A和B各自需要拿a和b份,问能否使得每个人拿到的蛋糕都是不连续的: 思路: 先把较少的蛋糕数一一对应相隔,然后判断剩下的能否隔一个取一个即可 #include<bits/stdc++.h> using namespace std; 阅读全文
posted @ 2021-02-01 10:52 dyhaohaoxuexi 阅读(95) 评论(0) 推荐(0) 编辑
摘要: A - Eating Symbols Easy 大意: 一开始是0,四个符号,-是-1,+是+1 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; string s; i 阅读全文
posted @ 2021-02-01 09:21 dyhaohaoxuexi 阅读(117) 评论(0) 推荐(0) 编辑
摘要: A 切蛋糕 大意: 现在有一个蛋糕,需要分给k个人,每次操作可以将一个蛋糕分为2份,还可以选择一些蛋糕打包为一份,最后需要打包出k份,使得每一份的蛋糕量为1/k,误差不大于1e-10,全部操作需要在6000步内完成‘ k保证不大于2e10 思路: 直接将所有的蛋糕分为1/1e-10,这样需要的操作数 阅读全文
posted @ 2021-01-31 01:12 dyhaohaoxuexi 阅读(283) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页