Submission #63505998
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
int main()
{
int N;
cin>>N;
int a[N];
for(int i=0;i<N;i++)
{
cin>>a[i];
}
int i=0;
for(i=0;i<N-2;i++)
{
if(a[i]==a[i+1]&&a[i+1]==a[i+2])
{
cout<<"Yes"<<endl;
break;
}
}
if(i==N-2)
cout<<"No"<<endl;
system("pause");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Triple Four |
| User | yyyyt |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 351 Byte |
| Status | AC |
| Exec Time | 42 ms |
| Memory | 3736 KiB |
Compile Error
Main.cpp: In function ‘int main()’:
Main.cpp:23:9: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
23 | system("pause");
| ~~~~~~^~~~~~~~~
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 | 42 ms | 3568 KiB |
| 00_sample_01.txt | AC | 2 ms | 3544 KiB |
| 00_sample_02.txt | AC | 2 ms | 3568 KiB |
| 00_sample_03.txt | AC | 2 ms | 3728 KiB |
| 00_sample_04.txt | AC | 2 ms | 3732 KiB |
| 01_handmade_00.txt | AC | 2 ms | 3532 KiB |
| 01_handmade_01.txt | AC | 2 ms | 3664 KiB |
| 01_handmade_02.txt | AC | 2 ms | 3728 KiB |
| 01_handmade_03.txt | AC | 2 ms | 3596 KiB |
| 01_handmade_04.txt | AC | 2 ms | 3660 KiB |
| 02_random_00.txt | AC | 2 ms | 3544 KiB |
| 02_random_01.txt | AC | 2 ms | 3660 KiB |
| 02_random_02.txt | AC | 2 ms | 3732 KiB |
| 02_random_03.txt | AC | 2 ms | 3536 KiB |
| 02_random_04.txt | AC | 2 ms | 3548 KiB |
| 02_random_05.txt | AC | 2 ms | 3548 KiB |
| 02_random_06.txt | AC | 2 ms | 3728 KiB |
| 02_random_07.txt | AC | 2 ms | 3596 KiB |
| 02_random_08.txt | AC | 2 ms | 3536 KiB |
| 02_random_09.txt | AC | 2 ms | 3736 KiB |