A - Wrong Answer
思路:
给你两个数 (A, B 0 ~ 9)输出非A+B(0 ~ 9)
解法:
许多 (A + B) ^ 1等等
Code:
#include<iostream> using namespace std; int main() { int A, B; cin >> A >> B; cout << !(A + B); return 0; }
B - Adjacency Matrix
思路:(输出邻接表)
如果是1代表连通 输出索引即可
Code:
#include<iostream> using namespace std; int main() { int N; cin >> N; for (int T = 1; T <= N; ++T) { for (int i = 1, x; i <= N; ++i) { cin >> x; if (x) cout << i << ' '; } cout << '\n'; } return 0; }
C - 343
思路:
回文lif
标签:AtCoder,cout,Contest,int,namespace,小白来,343,include From: https://www.cnblogs.com/youhualiuh/p/18049352