結果
| 問題 |
No.492 IOI数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-10 23:27:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 788 bytes |
| コンパイル時間 | 1,036 ms |
| コンパイル使用メモリ | 108,476 KB |
| 実行使用メモリ | 13,884 KB |
| 最終ジャッジ日時 | 2024-06-24 08:48:13 |
| 合計ジャッジ時間 | 3,642 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 1 WA * 3 TLE * 1 -- * 14 |
ソースコード
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"
using namespace std;
const long long int MOD = 1000000007;
long long int box = 1;
long long int N;
long long int num;
char ans[11][50] = { "1","101","10101","1010101","101010101","10101010101","1010101010101","101010101010101","10101010101010101","1010101010101010101","0" };
int main() {
cin >> N;
num = N % ((MOD + 1) / 2);
if (!num)num += ((MOD + 1) / 2);
for (int i = 2; i <= num; i++) {
box *= 100;
box++;
box %= MOD;
}
cout << box << endl;
cout << ans[(N+10) % 11] << endl;
return 0;
}