結果
問題 |
No.2809 Sort Query
|
ユーザー |
![]() |
提出日時 | 2024-07-12 16:35:35 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 938 ms |
コンパイル使用メモリ | 62,084 KB |
実行使用メモリ | 12,064 KB |
最終ジャッジ日時 | 2024-07-12 20:50:38 |
合計ジャッジ時間 | 10,571 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 69 |
ソースコード
#include<stdio.h> #include<algorithm> int main(){ int N,Q; scanf("%d%d",&N,&Q); long long A[N]; for(int i=0;i<N;i++){ scanf("%lld",&A[i]); } for(;Q--;){ int c; scanf("%d",&c); if(c==2){ std::sort(A,A+N); continue; } if(c==3){ int k; scanf("%d",&k); printf("%lld\n",A[k-1]); continue; } int k;long long x; scanf("%d%lld",&k,&x); A[k-1]=x; } }