結果
問題 | No.495 (^^*) Easy |
ユーザー | eiya5498513 |
提出日時 | 2017-03-24 23:36:40 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 732 bytes |
コンパイル時間 | 851 ms |
コンパイル使用メモリ | 95,292 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-20 04:34:12 |
合計ジャッジ時間 | 1,792 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,376 KB |
ソースコード
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include <iomanip> #include <numeric> #include <string> #define in std::cin #define out std::cout std::string S; int main() { using std::endl; in.sync_with_stdio(false); out.sync_with_stdio(false); in >> S; int rcount = 0; int pos = 0; for(;;) { pos = S.find("(*", pos); if (pos == S.npos) { break; } ++rcount; pos += 2; } out << (S.size() / 5 - rcount) << ' ' << rcount << endl; return 0; } #endif