Submission #2832912
Source Code Expand
#include<bits/stdc++.h> using namespace std; int a[100000]; int b[100000]; signed main(){ int n;cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; b[i]=a[i]; } sort(a,a+n); for(int i=0;i<n;i++){ if(b[i]==a[n-1]){ cout<<a[n-2]<<endl; } else cout<<a[n-1]<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | C - Traveling Plan |
User | naoki2016 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 296 Byte |
Status | WA |
Exec Time | 192 ms |
Memory | 1536 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 191 ms | 1536 KB |
02.txt | WA | 192 ms | 1536 KB |
03.txt | WA | 1 ms | 256 KB |
04.txt | WA | 189 ms | 1536 KB |
05.txt | WA | 192 ms | 1536 KB |
06.txt | WA | 190 ms | 1536 KB |
07.txt | WA | 191 ms | 1536 KB |
08.txt | WA | 192 ms | 1536 KB |
09.txt | WA | 180 ms | 1408 KB |
10.txt | WA | 181 ms | 1408 KB |
11.txt | WA | 180 ms | 1408 KB |
12.txt | WA | 180 ms | 1408 KB |
sample-01.txt | WA | 1 ms | 256 KB |
sample-02.txt | WA | 1 ms | 256 KB |
sample-03.txt | WA | 1 ms | 256 KB |