Submission #63495288
Source Code Expand
Copy
#include <bits/stdc++.h>#define endl "\n"#define N 200005#define PII pair<i64,i64>#define PSI pair<string,int>using namespace std;using i64 = long long;using i128 = __int128;using u32 = unsigned;using u64 = unsigned long long;using u128 = unsigned __int128;int a[N];void solve(){int n;cin>>n;for(int i=1;i<=n;i++){cin>>a[i];}
#include <bits/stdc++.h> #define endl "\n" #define N 200005 #define PII pair<i64,i64> #define PSI pair<string,int> using namespace std; using i64 = long long; using i128 = __int128; using u32 = unsigned; using u64 = unsigned long long; using u128 = unsigned __int128; int a[N]; void solve(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } bool flag=false; for(int i=1;i<=n-2;i++){ if(a[i]==a[i+1]&&a[i+1]==a[i+2]){ flag=true; break; } } if(flag){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr),cout.tie(nullptr); int t=1; // cin>>t; while(t--){ solve(); } return 0; } /* */
Submission Info
Submission Time | |
---|---|
Task | A - Triple Four |
User | Enchantment |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 739 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3520 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3516 KB |
00_sample_01.txt | AC | 1 ms | 3520 KB |
00_sample_02.txt | AC | 1 ms | 3392 KB |
00_sample_03.txt | AC | 1 ms | 3384 KB |
00_sample_04.txt | AC | 1 ms | 3472 KB |
01_handmade_00.txt | AC | 1 ms | 3468 KB |
01_handmade_01.txt | AC | 1 ms | 3320 KB |
01_handmade_02.txt | AC | 1 ms | 3456 KB |
01_handmade_03.txt | AC | 1 ms | 3408 KB |
01_handmade_04.txt | AC | 1 ms | 3396 KB |
02_random_00.txt | AC | 1 ms | 3400 KB |
02_random_01.txt | AC | 1 ms | 3456 KB |
02_random_02.txt | AC | 1 ms | 3516 KB |
02_random_03.txt | AC | 1 ms | 3436 KB |
02_random_04.txt | AC | 1 ms | 3444 KB |
02_random_05.txt | AC | 1 ms | 3328 KB |
02_random_06.txt | AC | 1 ms | 3448 KB |
02_random_07.txt | AC | 1 ms | 3460 KB |
02_random_08.txt | AC | 1 ms | 3328 KB |
02_random_09.txt | AC | 1 ms | 3396 KB |