結果
問題 |
No.3091 The Little Match Boy
|
ユーザー |
![]() |
提出日時 | 2025-04-06 15:33:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 316 bytes |
コンパイル時間 | 1,884 ms |
コンパイル使用メモリ | 198,484 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-04-06 15:33:06 |
合計ジャッジ時間 | 5,121 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 60 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int N,M; cin>>N>>M; vector<int> A(N); set<int> s; for(int i=0;i<N;i++) A[i] = i; for(int i=0;i<M;i++){ int a; cin>>a; s.insert(A[a-1]); swap(A[a-1],A[a]); } cout<<s.size()<<endl; }