結果
問題 | No.492 IOI数列 |
ユーザー | xuzijian629 |
提出日時 | 2018-09-11 10:13:19 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 2,087 bytes |
コンパイル時間 | 1,038 ms |
コンパイル使用メモリ | 103,124 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 03:05:36 |
合計ジャッジ時間 | 1,945 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 49 ms
6,940 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 2 ms
6,940 KB |
testcase_12 | AC | 1 ms
6,944 KB |
testcase_13 | AC | 1 ms
6,940 KB |
testcase_14 | AC | 1 ms
6,944 KB |
testcase_15 | AC | 1 ms
6,940 KB |
testcase_16 | AC | 1 ms
6,940 KB |
testcase_17 | AC | 1 ms
6,944 KB |
testcase_18 | AC | 1 ms
6,940 KB |
testcase_19 | AC | 1 ms
6,944 KB |
testcase_20 | AC | 2 ms
6,940 KB |
testcase_21 | AC | 8 ms
6,940 KB |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <stack> #include <queue> #include <set> #include <map> #include <unordered_map> #include <chrono> #include <random> #include <functional> #include <utility> #include <cassert> #pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "STACK:36777216") using namespace std; using i64 = int64_t; constexpr i64 MOD = 1e9 + 7; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); using vi = vector<i64>; using vvi = vector<vi>; using vvvi = vector<vvi>; using ii = pair<i64, i64>; i64 tmp[] = {1,568658242,832989125,964713680,432717573,865999464,735084983,588059454,834230221,314653273,421935805,244213913,499865885,806688401,709661070,3368271,207231765,170842191,827693172,146063335,960280099,966692748,461319921,315013999,315391517,588888893,51320231,320055902,684924180,384456174,797022895,14153804,367300832,48054659,484574239,560466957,4644675,389023,788082206,455179231,198885522,840681663,758718052,41061196,350742828,601928613,408922199,148427570,302573877,376573500,144300001,478837572,431568836,185203966,327504435,430091869,417874738,421521591,682840839,622404319,296328424,970884251,734888505,903100813,478433713,91690004,254048209,881130177,473847831,849538152,104286961,902479973,955740468,856586321,945512322,588744593,241410053,993457327,583703689,650561389,712458802,979471021,958467374,422206051,62266485,77592561,337918007,660154005,703985793,404410458,17797199,332634843,756007764,278415043,181039352,868784608,583986413,368933151,348032305,490943380,24430014}; i64 get(i64 n) { i64 rem = tmp[n / i64(1e7)]; for (int i = n / i64(1e7) * i64(1e7); i < n; i++) { rem *= 100; rem += 1; rem %= MOD; } return rem; } vector<string> ans2 = {"1"}; int main() { i64 n; cin >> n; n = (n - 1) % (MOD - 1); cout << get(n) << endl; for (int i = 0; i < 12; i++) { ans2.push_back(ans2.back() + "01"); } cout << ans2[n % 11] << endl; }