Submission #56243232
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;using ui = unsigned;using ll = long long;using ull = unsigned long long;using ld = long double;#define rep(i,l,r) for(int i=(l);i<=(r);++i)#define per(i,l,r) for(int i=(l);i>=(r);--i)#define repn(i,n) for(int i=0;i<(n);++i)#define sizc(x) ((int)(x).size())#define allc(x) (x).begin(),(x).end()#define fir first#define sec secondconstexpr int N = 105;int n,a[N],b[N];signed main(){ios::sync_with_stdio(false);
#include <bits/stdc++.h> using namespace std; using ui = unsigned; using ll = long long; using ull = unsigned long long; using ld = long double; #define rep(i,l,r) for(int i=(l);i<=(r);++i) #define per(i,l,r) for(int i=(l);i>=(r);--i) #define repn(i,n) for(int i=0;i<(n);++i) #define sizc(x) ((int)(x).size()) #define allc(x) (x).begin(),(x).end() #define fir first #define sec second constexpr int N = 105; int n,a[N],b[N]; signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin>>n;rep(i,1,n)cin>>a[i],b[i]=a[i]; sort(b+1,b+n+1); rep(i,1,n)if(a[i]==b[n-1]){cout<<i<<'\n';return 0;} }
Submission Info
Submission Time | |
---|---|
Task | B - Second Best |
User | KnownError_ |
Language | C++ 20 (gcc 12.2) |
Score | 200 |
Code Size | 640 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3524 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 1 ms | 3472 KB |
00_sample_02.txt | AC | 1 ms | 3380 KB |
01_test_01.txt | AC | 1 ms | 3416 KB |
01_test_02.txt | AC | 1 ms | 3520 KB |
01_test_03.txt | AC | 1 ms | 3472 KB |
01_test_04.txt | AC | 1 ms | 3456 KB |
01_test_05.txt | AC | 1 ms | 3524 KB |
01_test_06.txt | AC | 1 ms | 3520 KB |
01_test_07.txt | AC | 1 ms | 3408 KB |
01_test_08.txt | AC | 1 ms | 3472 KB |
01_test_09.txt | AC | 1 ms | 3468 KB |
01_test_10.txt | AC | 1 ms | 3440 KB |
01_test_11.txt | AC | 1 ms | 3384 KB |
01_test_12.txt | AC | 1 ms | 3388 KB |
01_test_13.txt | AC | 1 ms | 3472 KB |