結果
問題 | No.495 (^^*) Easy |
ユーザー | eiya5498513 |
提出日時 | 2017-03-24 23:36:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 732 bytes |
コンパイル時間 | 841 ms |
コンパイル使用メモリ | 96,124 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 00:48:25 |
合計ジャッジ時間 | 1,151 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
#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