結果
問題 |
No.3259 C++ → Rust → Python
|
ユーザー |
|
提出日時 | 2025-08-07 10:00:51 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 771 bytes |
コンパイル時間 | 3,549 ms |
コンパイル使用メモリ | 279,460 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-07 10:00:56 |
合計ジャッジ時間 | 4,712 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define MAX_R 999 std::vector<std::string> prepare() { std::vector<std::string> v; for (int_least16_t i = 0; i <= 295; ++i) v.push_back(std::string("C++")); for (int_least16_t i = 296; i <= 416; ++i) v.push_back(std::string("Rust")); for (int_least16_t i = 417; i <= MAX_R; ++i) v.push_back(std::string("Python")); return v; } int_least16_t solve(const int_least16_t L, const int_least16_t R) { int_least16_t ans = 0; for (int_least16_t i = L; L <= i && i + 1 <= R; ++i) { std::vector<std::string> v = prepare(); ans += (v[i] != v[i + 1]); } return ans; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int_least16_t L, R; std::cin >> L >> R; std::cout << solve(L, R) << '\n'; return 0; }