結果
問題 |
No.43 野球の試合
|
ユーザー |
![]() |
提出日時 | 2017-11-30 16:29:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 490 ms |
コンパイル使用メモリ | 55,076 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 15:09:38 |
合計ジャッジ時間 | 1,267 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 2 WA * 5 |
ソースコード
#include <iostream> using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } #define rep(i, a, b) for(int i = a; i < b; i++) #define scan(x) cin >> x #define print(x) cout << x << "\n" int main() { fastcin; int n; scan(n); char s[n]; scan(s); int no = 1; rep(i, 1, n) { if (s[i]=='-') no--; else if (s[i]=='x') no++; } if (no < 1) no = 1; print(no); return 0; }