結果
| 問題 | No.657 テトラナッチ数列 Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-26 22:09:20 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 620 bytes |
| 記録 | |
| コンパイル時間 | 616 ms |
| コンパイル使用メモリ | 97,416 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-05-16 00:02:30 |
| 合計ジャッジ時間 | 5,123 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | RE * 5 TLE * 1 -- * 7 |
ソースコード
#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;
}
}