結果
問題 |
No.1032 数数え
|
ユーザー |
![]() |
提出日時 | 2020-04-23 13:48:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 315 ms / 2,000 ms |
コード長 | 1,123 bytes |
コンパイル時間 | 832 ms |
コンパイル使用メモリ | 101,344 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 12:34:04 |
合計ジャッジ時間 | 2,359 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<algorithm>//sort,二分探索,など #include<bitset>//固定長bit集合 #include<cmath>//pow,logなど #include<complex>//複素数 #include<deque>//両端アクセスのキュー #include<functional>//sortのgreater #include<iomanip>//setprecision(浮動小数点の出力の誤差) #include<iostream>//入出力 #include<iterator>//集合演算(積集合,和集合,差集合など) #include<map>//map(辞書) #include<numeric>//iota(整数列の生成),gcdとlcm(c++17) #include<queue>//キュー #include<set>//集合 #include<stack>//スタック #include<string>//文字列 #include<unordered_map>//イテレータあるけど順序保持しないmap #include<unordered_set>//イテレータあるけど順序保持しないset #include<utility>//pair #include<vector>//可変長配列 typedef long long ll; using namespace std; int main(void){ // Your code here! ll N, M, L; cin >> N >> M; ll* arr = new ll[M]; while(cin >> L){ if (L > M) continue; arr[L - 1] = arr[L - 1] + 1; } for(ll i = 0; i < M; i++){ cout << i+1 << " " << arr[i] << endl;; } }