結果
問題 |
No.657 テトラナッチ数列 Easy
|
ユーザー |
|
提出日時 | 2017-10-26 22:09:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 620 bytes |
コンパイル時間 | 867 ms |
コンパイル使用メモリ | 74,324 KB |
実行使用メモリ | 13,644 KB |
最終ジャッジ日時 | 2024-11-21 20:12:29 |
合計ジャッジ時間 | 17,673 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 TLE * 1 |
other | WA * 4 RE * 5 TLE * 4 |
ソースコード
#include <iostream> #include <random> #include <vector> using namespace std; int main(){ int N, K, X; cin >> N >> K >> X; cout << N << endl << K << endl; vector<int> nums; random_device rd; for(int i = 0; i < N; i++){ int num; bool if_ok = false; while(!if_ok){ num = rd() % X; if_ok = true; for(int i = 0; i < nums.size(); i++){ if(num == nums[i]){ if_ok = false; break; } } } nums.push_back(num); cout << num << endl; } }