結果
| 問題 | No.3707 Unique Ticket |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-11 21:26:35 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 745µs | |
| コード長 | 762 bytes |
| 記録 | |
| コンパイル時間 | 1,949 ms |
| コンパイル使用メモリ | 333,144 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-11 21:26:46 |
| 合計ジャッジ時間 | 4,129 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 45 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int n, m;
cin >> n >> m;
vector<string> s(n);
rep(i, n) cin >> s[i];
int ans = 0;
rep(i, n) {
bool ok1 = true;
bool ok2 = false;
rep(j, m) {
if (s[i][j] == 'o') {
ok2 = true;
int c = 0;
rep(k, n) {
if (s[k][j] == 'o')
c++;
}
if (c != 1)
ok1 = false;
}
}
if (ok1 && ok2)
ans++;
}
cout << ans << endl;
return 0;
}