摘要:
//这道题利用c语言的输入输出才可AC,不然会一直超时#include int main(){ int m, n, a, b, c, k; scanf("%d %d %d %d %d", &m, &n, &a, &b, &c); while (m--){ for (int i = 0; i = a && k <= b) k... 阅读全文
摘要:
// 思路是网上以一位大神的,特简单直接采用字符串,判断长度,还有最后一个元素是否T,便可通过ASCll输出数字;#include #include using namespace std; string s; int main(){ while (cin >> s){ if (s.size() == 3 && s[2] == 'T') cou... 阅读全文
摘要:
#include #include using namespace std; int main(){ int T, K; cin >> T >> K; while (K--){ int n1, b, t, n2; cin >> n1 >> b >> t >> n2; if (t > T) { //结果的输出前后顺序需要注... 阅读全文
摘要:
#include using namespace std; int main(){ int n, A, a, cntA = 0, B, b, cntB = 0; cin >> n; while (n--){ cin >> A >> a >> B >> b; if ((a != A + B && b != A + B) || (a == A... 阅读全文
摘要:
#include using namespace std; int arr[100] = {0}; int main(){ int n, m, sum; cin >> n >> m; sum = n * m; if (sum == 0) cout << 0 << endl; else{ int i = 0, flag = ... 阅读全文
摘要:
#include #include using namespace std; int main(){ int n; string str; cin >> n; getchar(); while (n--){ int str_num = 0, str_letter = 0, str_dot = 0, str_other = 0; ... 阅读全文
摘要:
#include using namespace std; int arr[100100] = {0}; // 大的数组尽量开主函数外面 int main(){ int n, m, x, t; cin >> n; for (int i = 0; i > x; arr[x]++; } cin >> m; for (int i = ... 阅读全文
摘要:
#include using namespace std; int main(){ int n, m; char ch; cin >> n >> ch; if (n % 2 == 0) // 行数的奇偶变化 m = n / 2; else m = n / 2 + 1; for (int i = 0; i < ... 阅读全文
摘要:
#include #include using namespace std; int main(){ int n, m, max = 1, arr[100005]; cin >> n >> m; for (int i = 0; i > arr[i]; sort(arr, arr + n); for (int j = 0; j = arr[k]){ ... 阅读全文
摘要:
#include #include using namespace std; int main(){ int index, arr[10] = {0}; string num; // 一千位的数字很大所以要用字符串进行转化 getline(cin, num); for (int i = 0; i < num.size(); i++){ in... 阅读全文