結果
問題 | No.1006 Share an Integer |
ユーザー | kotamanegi |
提出日時 | 2020-03-06 21:27:49 |
言語 | C++17(clang) (17.0.6 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,176 bytes |
コンパイル時間 | 1,933 ms |
コンパイル使用メモリ | 165,332 KB |
実行使用メモリ | 71,140 KB |
最終ジャッジ日時 | 2024-05-07 20:35:25 |
合計ジャッジ時間 | 7,728 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 88 ms
20,600 KB |
testcase_01 | AC | 89 ms
20,700 KB |
testcase_02 | AC | 91 ms
20,312 KB |
testcase_03 | WA | - |
testcase_04 | AC | 88 ms
20,404 KB |
testcase_05 | AC | 85 ms
19,460 KB |
testcase_06 | AC | 87 ms
19,344 KB |
testcase_07 | AC | 86 ms
20,788 KB |
testcase_08 | AC | 94 ms
19,776 KB |
testcase_09 | AC | 93 ms
19,160 KB |
testcase_10 | AC | 97 ms
19,280 KB |
testcase_11 | AC | 284 ms
69,960 KB |
testcase_12 | AC | 416 ms
70,228 KB |
testcase_13 | AC | 434 ms
71,012 KB |
testcase_14 | AC | 428 ms
68,928 KB |
testcase_15 | AC | 378 ms
69,584 KB |
testcase_16 | AC | 225 ms
46,844 KB |
testcase_17 | AC | 283 ms
69,904 KB |
testcase_18 | AC | 372 ms
69,628 KB |
testcase_19 | AC | 368 ms
68,924 KB |
testcase_20 | AC | 388 ms
69,564 KB |
testcase_21 | AC | 426 ms
71,140 KB |
コンパイルメッセージ
main.cpp:2:18: warning: '#pragma comment linker' ignored [-Wignored-pragmas] 2 | #pragma comment (linker, "/STACK:526000000") | ^ 1 warning generated.
ソースコード
#define _CRT_SECURE_NO_WARNINGS #pragma comment (linker, "/STACK:526000000") #include "bits/stdc++.h" using namespace std; typedef string::const_iterator State; #define eps 1e-11L #define MAX_MOD 1000000007LL #define GYAKU 500000004LL #define MOD 998244353LL #define seg_size 262144 * 4LL #define pb push_back #define mp make_pair typedef long long ll; #define REP(a,b) for(long long (a) = 0;(a) < (b);++(a)) #define ALL(x) (x).begin(),(x).end() void init() { iostream::sync_with_stdio(false); cout << fixed << setprecision(20); } #define int ll int d[3000000]; int f(int x) { return x - d[x]; } void solve() { for (int i = 1; i <= 2e6; ++i) { for (int q = 1; q * i <= 2e6; ++q) { d[i * q]++; } } int x; cin >> x; vector<tuple<int, int, int>> inputs; REP(i, x) { inputs.push_back(make_tuple((long long)abs(f(i + 1) - f(x - i - 1)), i + 1,x - i - 1)); } sort(ALL(inputs)); REP(i, inputs.size()) { if (get<0>(inputs[i]) != get<0>(inputs[0])) break; cout << get<1>(inputs[i]) << " " << get<2>(inputs[i]) << endl; } } #undef int int main() { init(); solve(); }