結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-08-12 16:59:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 562 bytes |
| コンパイル時間 | 797 ms |
| コンパイル使用メモリ | 92,844 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-09 18:30:28 |
| 合計ジャッジ時間 | 1,300 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
using namespace std;
int main() {
string S;
cin >> S;
int L = 0, R = 0;
for (int i = 0; i < S.size(); ++i) {
string subst = S.substr(i, 2);
if (subst == "*)") {
L += 1;
} else if (subst == "(*") {
R += 1;
}
}
cout << L << " " << R << endl;
return 0;
}
f843nmfwisfeuw