結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-13 15:03:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 458 bytes |
| コンパイル時間 | 1,612 ms |
| コンパイル使用メモリ | 165,764 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 19:46:08 |
| 合計ジャッジ時間 | 1,992 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
//No.516 赤と青の風船
#include <bits/stdc++.h>
using namespace std;
namespace
{
int iL;
int iR;
char S[ 100010 ];
int Chk( const char *S )
{
if( S[ 0 ] == '(' )
{
if( S[ 1 ] == '^' ) iL++;
else if( S[ 1 ] == '*' ) iR++;
else
return - 1;
}
else
return - 1;
return 0;
}
}
int main()
{
int iPos;
cin >> S;
iL = 0;
iR = 0;
iPos = 0;
while( Chk( S + iPos ) == 0 ) iPos += 5;
cout << iL << " " << iR << endl;
return 0;
}