結果
| 問題 | No.495 (^^*) Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-22 19:23:03 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 3 ms / 2,000 ms |
| + 457µs | |
| コード長 | 673 bytes |
| 記録 | |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 102,140 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-11-10 15:27:10 |
| 合計ジャッジ時間 | 1,826 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
#include <iostream> //cin, cout
#include <vector> //vector
#include <algorithm> //sort,min,max,count
#include <string> //string,getline, to_string
#include <cstdlib> //abs(int)
#include <utility> //swap, pair
#include <deque> //deque
#include <climits> //INT_MAX
#include <bitset> //bitset
#include <cmath> //sqrt, ceil. M_PI, pow, sin
#include <ios> //fixed
#include <iomanip> //setprecision
using namespace std;
int main() {
string S;
cin >> S;
int L = 0, R = 0;
for (unsigned int i = 0; i < S.length(); i++) {
if (S[i] == '*') {
if (S[i + 1] == ')') {
L++;
}
else {
R++;
}
}
}
cout << L << " " << R << endl;
return 0;
}