Submission #60036768
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;#define int long long#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);#define nl "\n";#define inf LLONG_MAX#define pb push_back#define pi pair<int, int>#define mp make_pair#define ff first#define ss second#define show(x) cerr << #x << " is " << x << nl;#define showw(x, y) cerr << #x << " is " << x << " " << #y << " is " << y << nl;#define showall(x) cerr << #x << " is "; for (auto i : x) {cerr << i << " ";} cerr << nl;signed main(){fastioint n;cin >> n;string s;cin >> s;
#include <bits/stdc++.h> using namespace std; #define int long long #define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define nl "\n"; #define inf LLONG_MAX #define pb push_back #define pi pair<int, int> #define mp make_pair #define ff first #define ss second #define show(x) cerr << #x << " is " << x << nl; #define showw(x, y) cerr << #x << " is " << x << " " << #y << " is " << y << nl; #define showall(x) cerr << #x << " is "; for (auto i : x) {cerr << i << " ";} cerr << nl; signed main(){ fastio int n; cin >> n; string s; cin >> s; if(n%2==0){ cout << "No" << nl; return 0; } bool pos = true; int mid = (n-1)/2; for (int i=0; i<mid; i++){ if(s[i]!='1'){ pos = false; break; } } if(s[mid]!='/') { pos = false; } for (int i=mid+1; i<n; i++){ if(s[i]!='2'){ pos = false; break; } } if(pos) { cout << "Yes" << nl; } else cout << "No" << nl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 11/22 String |
User | penguin0 |
Language | C++ 17 (gcc 12.2) |
Score | 150 |
Code Size | 979 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3600 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 150 / 150 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 02_corner_00.txt, 02_corner_01.txt, 02_corner_02.txt, 02_corner_03.txt, 02_corner_04.txt, 02_corner_05.txt, 02_corner_06.txt, 02_corner_07.txt, 02_corner_08.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3424 KB |
00_sample_01.txt | AC | 1 ms | 3484 KB |
00_sample_02.txt | AC | 1 ms | 3440 KB |
00_sample_03.txt | AC | 1 ms | 3348 KB |
01_random_00.txt | AC | 1 ms | 3392 KB |
01_random_01.txt | AC | 1 ms | 3600 KB |
01_random_02.txt | AC | 1 ms | 3516 KB |
01_random_03.txt | AC | 1 ms | 3396 KB |
01_random_04.txt | AC | 1 ms | 3420 KB |
01_random_05.txt | AC | 1 ms | 3472 KB |
01_random_06.txt | AC | 1 ms | 3440 KB |
01_random_07.txt | AC | 1 ms | 3420 KB |
01_random_08.txt | AC | 1 ms | 3428 KB |
01_random_09.txt | AC | 1 ms | 3412 KB |
02_corner_00.txt | AC | 1 ms | 3380 KB |
02_corner_01.txt | AC | 1 ms | 3380 KB |
02_corner_02.txt | AC | 1 ms | 3424 KB |
02_corner_03.txt | AC | 1 ms | 3440 KB |
02_corner_04.txt | AC | 1 ms | 3400 KB |
02_corner_05.txt | AC | 1 ms | 3488 KB |
02_corner_06.txt | AC | 1 ms | 3424 KB |
02_corner_07.txt | AC | 1 ms | 3316 KB |
02_corner_08.txt | AC | 1 ms | 3420 KB |