Codeforces Round 918 (Div. 4)(A~F)

07-08 1082阅读

目录

A. Odd One Out

B. Not Quite Latin Square

C. Can I Square?

D. Unnatural Language Processing

E. Romantic Glasses

F. Greetings


A. Odd One Out

Problem - A - Codeforces

Codeforces Round 918 (Div. 4)(A~F)

Codeforces Round 918 (Div. 4)(A~F)

输出一个不同于其他两个数的数,用异或操作可以轻松解决。

void solve{
    int a,b,c;
    cin>>a>>b>>c;
    cout
h3 id="B.%20Not%20Quite%20Latin%20Square"B. Not Quite Latin Square/h3 pProblem - B - Codeforces/p pimg height="682" src="https://img-blog.csdnimg.cn/direct/df214b6c0fdb4353a8ac52598bc47fda.png" width="800" //p pimg height="267" src="https://img-blog.csdnimg.cn/direct/51fcc36feeac4caa913d3584b5d40e00.png" width="817" //p pimg height="309" src="https://img-blog.csdnimg.cn/direct/819d9e115f0e4059a959e3193bef0191.png" width="847" //p p找到?的位置,再分析它这行和列出现的元素。/p pre class="brush:python;toolbar:false"char a[30][30]; void solve() { int x, y; for (int i = 1; i = 3; i++) { for (int j = 1; j = 3; j++) { cin a[i][j]; if (a[i][j] == '?') { x = i, y = j; } } } int f[200]; memset(f, 0, sizeof(f)); for (int i = 1; i = 3; i++) { f[a[x][i]]++; f[a[i][y]]++; } for (int i = 'A'; i = 'C'; i++) { if (!f[i]) { cout s; for (int i = 0; i = s.size() - 2) { ans += s[i]; continue; } if (pos[i]) { ans += s[i]; ans += '.'; continue; } if (t[i] == 'V'&&!pos[i+1]) { ans += s[i]; ans += '.'; continue; } ans += s[i]; } cout n; for (int i = 1; i > f[i]; ll sum = 0; mapv; for (int i = 1; i e[i].s >> e[i].e; } sort(e + 1, e + 1 + n, cmp); for (int i = 1; i
VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]