結果
| 問題 | No.3558 Dominoes, Black and White |
| コンテスト | |
| ユーザー |
mint
|
| 提出日時 | 2026-09-02 23:47:25 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 755 bytes |
| 記録 | |
| コンパイル時間 | 1,146 ms |
| コンパイル使用メモリ | 218,992 KB |
| 実行使用メモリ | 26,700 KB |
| 最終ジャッジ日時 | 2026-09-02 23:47:38 |
| 合計ジャッジ時間 | 7,678 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点 | 10 % | AC * 20 WA * 10 |
| 満点 | 90 % | AC * 25 WA * 64 |
| 合計 | 0 点 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n; cin >> n;
vector<string> s(n);
for(auto &&e: s) cin >> e;
int z = 0;
vector<pair<int, int>> l, r;
for(int i = 0; i < n; ++i){
for(int j = 0; j < n; ++j){
if(s[i][j] == '#') l.emplace_back(make_pair(i, j));
}
}
for(int i = 0; i < n; ++i){
for(int j = n; j < n*2; ++j){
if(s[i][j] == '.') r.emplace_back(make_pair(i, j));
}
}
int lx = 0, ly = 0, rx = 0, ry = 0;
for(auto[x, y]: l){
lx += x;
ly += y;
}
for(auto[x, y]: r){
rx += x;
ry += y;
}
//cout << lx << " : " << ly << " : " << rx << " : " << ry << '\n';
z = (rx - lx) + (ry - ly);
cout << z << '\n';
return 0;
}
mint