結果
問題 |
No.1162 Many Quotients hard
|
ユーザー |
![]() |
提出日時 | 2025-06-29 08:33:06 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 649 bytes |
コンパイル時間 | 3,300 ms |
コンパイル使用メモリ | 280,868 KB |
実行使用メモリ | 822,304 KB |
最終ジャッジ日時 | 2025-06-29 08:33:15 |
合計ジャッジ時間 | 7,837 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 21 MLE * 1 -- * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include <debug.hpp> #else #define debug(...) #endif vector<tuple<ll, ll, ll>> quotient_ranges(ll n) { vector<tuple<ll, ll, ll>> res; ll k = 1; while (k * k <= n) k++; for (ll i = 1; i <= n / k; i++) { res.emplace_back(i, n / (i + 1) + 1, n / i + 1); } for (ll i = k - 1; i >= 1; i--) { res.emplace_back(n / i, i, i + 1); } return res; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); ll N; cin >> N; cout << ssize(quotient_ranges(N)) << '\n'; }