結果
問題 |
No.43 野球の試合
|
ユーザー |
![]() |
提出日時 | 2018-06-23 14:01:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 1,595 ms |
コンパイル使用メモリ | 168,372 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 18:18:28 |
合計ジャッジ時間 | 2,098 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n,ans = 1,count = 0; cin >> n; char a[n][n]; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ cin >> a[i][j]; } } for(int i = 0; i < n; i++){ if(a[0][i] == 'x') ans++; if(a[0][i] == 'o' || a[0][i] == '-') count++; } ans = ans - count; if(ans < 1) ans = 1; cout << ans << endl; return 0; }