摘要:
A dreamstart的催促 快速幂模板题 #include<bits/stdc++.h> #define ll long long using namespace std; const int mod = 10000019; int n , ans = 0; int ksm( ll x , ll 阅读全文
摘要:
比赛链接 A.星图 l[i],r[i],u[i],d[i]分别代表第$i$行或(列)从某个方向看过去的第一个黑洞所在位置 然后判断对应的黑洞是否在当前点的后面 #include <bits/stdc++.h> using namespace std; const int N = 1005; int 阅读全文
摘要:
P2249 二分答案 直接套用lower_bound() #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; int n , m , a[N]; inline int read() { register int x 阅读全文
摘要:
A 没有一百毫升有A卡路里,B毫升中有多少卡路里 #include <bits/stdc++.h> using namespace std; int main() { double a , b; cin >> a >> b; cout << a * b / 100 << endl; return 0 阅读全文
摘要:
A 正反各跑一遍匹配 正着满足,反着不满足,没有坐反 正着不满足,反着满足,坐反 都满足,不知道 #include <bits/stdc++.h> using namespace std; int n , m , x , y , a[20] , b[20] , c1[20] , c2[20] , o 阅读全文
摘要:
A 签到 #include <bits/stdc++.h> using namespace std; int main() { int a , b; cin >> a >> b; cout << a * b << endl; return 0; } B 签到,用long long #include 阅读全文
摘要:
A 给一个数列[1...5]其中有一位是错误的,错误位置是0,问哪一位错误 #include <bits/stdc++.h> using namespace std; int main() { for( int i = 1 , x ; i <= 5 ; i ++ ) { cin >> x; if( 阅读全文
摘要:
题目链接 A 签到题 #include <bits/stdc++.h> using namespace std; int a , b ; int main() { cin >> a >> b; if( a < b ) puts("0"); else puts("10"); } B 枚举即可,判断特殊 阅读全文