提出 #37326911
ソースコード 拡げる
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const double PI = acos(-1);
int main() {
int n, m;
cin >> n >> m;
vector<string> s(n);
rep(i,n) cin >> s[i];
int ans = 0;
rep(i,n)rep(j,i) {
int cnt = 0;
rep(k,m) {
if (s[i][k] == 'o' || s[j][k] == 'o') cnt++;
}
if (cnt == m) ans++;
}
cout << ans << endl;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Let's Get a Perfect Score |
| ユーザ | taki0711 |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 200 |
| コード長 | 767 Byte |
| 結果 | AC |
| 実行時間 | 8 ms |
| メモリ | 3572 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt, 02_handmade_07.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_01.txt | AC | 8 ms | 3568 KiB |
| 00_sample_02.txt | AC | 2 ms | 3560 KiB |
| 00_sample_03.txt | AC | 2 ms | 3568 KiB |
| 01_test_01.txt | AC | 2 ms | 3568 KiB |
| 01_test_02.txt | AC | 3 ms | 3472 KiB |
| 01_test_03.txt | AC | 2 ms | 3404 KiB |
| 01_test_04.txt | AC | 2 ms | 3396 KiB |
| 01_test_05.txt | AC | 3 ms | 3476 KiB |
| 01_test_06.txt | AC | 2 ms | 3396 KiB |
| 01_test_07.txt | AC | 2 ms | 3468 KiB |
| 01_test_08.txt | AC | 2 ms | 3384 KiB |
| 01_test_09.txt | AC | 2 ms | 3472 KiB |
| 01_test_10.txt | AC | 2 ms | 3476 KiB |
| 02_handmade_01.txt | AC | 4 ms | 3404 KiB |
| 02_handmade_02.txt | AC | 6 ms | 3388 KiB |
| 02_handmade_03.txt | AC | 2 ms | 3424 KiB |
| 02_handmade_04.txt | AC | 2 ms | 3444 KiB |
| 02_handmade_05.txt | AC | 2 ms | 3472 KiB |
| 02_handmade_06.txt | AC | 2 ms | 3428 KiB |
| 02_handmade_07.txt | AC | 2 ms | 3572 KiB |