04 2017 档案
摘要:A.暴力把每个位置的字符改成另外25个字符,判断是否回文。 #include<bits/stdc++.h> using namespace std; string s; int main() { ios::sync_with_stdio(false); cin >> s; for(int i = 0
阅读全文
摘要:A.取中间那个点即可。 #include<bits/stdc++.h> using namespace std; int a[3]; int main() { ios::sync_with_stdio(false); cin >> a[0] >> a[1] >> a[2]; sort(a,a+3);
阅读全文
摘要:A.相遇时间段l = max(l1,l2),r = min(r1,r2),再判断k是否在里面。 #include <iostream> using namespace std; long long l1,l2,r1,r2,k; int main() { cin >> l1 >> r1 >> l2 >
阅读全文
摘要:A.直接暴力就行了,先把能组合的按线性组合掉,再枚举剩下相邻没用过的。 #include<bits/stdc++.h> using namespace std; string s; int vis[105] = {0}; int main() { ios::sync_with_stdio(false
阅读全文
摘要:学了一学期还是那么菜。 好久没更新,还是得放点东西的。 A.贪心最小的素因子,k = 1时,直接输出n就可以了。 #include<bits/stdc++.h> using namespace std; int n,k; vector <int> ans; int main() { ios::syn
阅读全文

浙公网安备 33010602011771号