Please sign in first.
Submission #22280007
Source Code Expand
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧_∧
∧_∧ (´<_` ) Welcome to My Coding Space!
( ´_ゝ`) / ⌒i @hamayanhamayan0
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/
string S;
string ooo = "ooo", xxx = "xxx";
//---------------------------------------------------------------------------------------------------
void _main() {
cin >> S;
rep(i, 0, 5) {
if (S.substr(i, 3) == ooo) {
cout << "o" << endl;
return;
}
if (S.substr(i, 3) == xxx) {
cout << "x" << endl;
return;
}
}
cout << "draw" << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - OX Game |
| User | hamayanhamayan |
| Language | C++ (GCC 9.2.1) |
| Score | 9 |
| Code Size | 1667 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3664 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 9 / 9 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 15.txt, 16.txt, 17.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 30.txt, 31.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 1.txt | AC | 7 ms | 3512 KiB |
| 10.txt | AC | 2 ms | 3516 KiB |
| 11.txt | AC | 2 ms | 3520 KiB |
| 12.txt | AC | 2 ms | 3584 KiB |
| 13.txt | AC | 3 ms | 3592 KiB |
| 15.txt | AC | 2 ms | 3596 KiB |
| 16.txt | AC | 2 ms | 3520 KiB |
| 17.txt | AC | 2 ms | 3648 KiB |
| 19.txt | AC | 2 ms | 3576 KiB |
| 2.txt | AC | 2 ms | 3664 KiB |
| 20.txt | AC | 2 ms | 3584 KiB |
| 21.txt | AC | 2 ms | 3580 KiB |
| 22.txt | AC | 2 ms | 3592 KiB |
| 23.txt | AC | 2 ms | 3452 KiB |
| 24.txt | AC | 2 ms | 3644 KiB |
| 25.txt | AC | 2 ms | 3592 KiB |
| 26.txt | AC | 3 ms | 3512 KiB |
| 27.txt | AC | 2 ms | 3580 KiB |
| 28.txt | AC | 3 ms | 3512 KiB |
| 29.txt | AC | 2 ms | 3580 KiB |
| 3.txt | AC | 6 ms | 3516 KiB |
| 30.txt | AC | 3 ms | 3536 KiB |
| 31.txt | AC | 2 ms | 3476 KiB |
| 4.txt | AC | 2 ms | 3516 KiB |
| 5.txt | AC | 2 ms | 3516 KiB |
| 6.txt | AC | 2 ms | 3640 KiB |
| 7.txt | AC | 2 ms | 3588 KiB |
| 8.txt | AC | 6 ms | 3580 KiB |
| 9.txt | AC | 2 ms | 3536 KiB |
| sample_01.txt | AC | 2 ms | 3532 KiB |
| sample_02.txt | AC | 3 ms | 3584 KiB |
| sample_03.txt | AC | 2 ms | 3520 KiB |