Submission #62020467
Source Code Expand
Copy
#include<bits/stdc++.h>using namespace std;int a[10];int main(){for(int i=0;i<5;i++) scanf("%d",&a[i]);int x=0;for(int i=0;i<4;i++)for(int j=i+1;j<5;j++)if(a[i]>a[j]) ++x;if(x==1) puts("Yes");else puts("No");return 0;}
#include<bits/stdc++.h> using namespace std; int a[10]; int main() { for(int i=0;i<5;i++) scanf("%d",&a[i]); int x=0; for(int i=0;i<4;i++) for(int j=i+1;j<5;j++) if(a[i]>a[j]) ++x; if(x==1) puts("Yes");else puts("No"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 12435 |
User | Demeanor |
Language | C++ 20 (gcc 12.2) |
Score | 150 |
Code Size | 254 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3864 KB |
Compile Error
Main.cpp: In function ‘int main()’: Main.cpp:7:35: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | for(int i=0;i<5;i++) scanf("%d",&a[i]); | ~~~~~^~~~~~~~~~~~
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_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 02_Yes_00.txt, 02_Yes_01.txt, 03_No_00.txt, 03_No_01.txt, 03_No_02.txt, 03_No_03.txt, 03_No_04.txt, 03_No_05.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3696 KB |
00_sample_01.txt | AC | 1 ms | 3864 KB |
00_sample_02.txt | AC | 1 ms | 3620 KB |
00_sample_03.txt | AC | 1 ms | 3748 KB |
01_handmade_00.txt | AC | 1 ms | 3680 KB |
01_handmade_01.txt | AC | 1 ms | 3644 KB |
01_handmade_02.txt | AC | 1 ms | 3668 KB |
02_Yes_00.txt | AC | 1 ms | 3572 KB |
02_Yes_01.txt | AC | 1 ms | 3644 KB |
03_No_00.txt | AC | 1 ms | 3676 KB |
03_No_01.txt | AC | 1 ms | 3684 KB |
03_No_02.txt | AC | 1 ms | 3632 KB |
03_No_03.txt | AC | 1 ms | 3616 KB |
03_No_04.txt | AC | 1 ms | 3616 KB |
03_No_05.txt | AC | 1 ms | 3680 KB |