結果
| 問題 | No.3454 Zodiac |
| コンテスト | |
| ユーザー |
ロロ宮
|
| 提出日時 | 2026-02-28 13:39:42 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 907 bytes |
| 記録 | |
| コンパイル時間 | 7,789 ms |
| コンパイル使用メモリ | 363,192 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-02-28 13:39:54 |
| 合計ジャッジ時間 | 7,292 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 7 |
ソースコード
#include <bits/stdc++.h>
#ifdef LOCAL
#include <library/my_library/utility/debug.hpp>
#else
#define debug(...)
#endif
using namespace std;
namespace rv = std::views; // NOLINT
// clang-format off
using lint = long long;
using P = pair<lint, lint>;
#define ALL(a) (a).begin(), (a).end()
template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
inline void Yes(bool b = true) { println("{}",(b ? "Yes" : "No")); }
inline void No() { println("{}", "No");}
// clang-format on
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int P, Q, Y, p, q, y;
cin >> P >> Q >> Y >> p >> q >> y;
int diff = y - Y;
p += diff;
q += diff;
p %= P;
q %= Q;
if (p == 0) p = P;
if (q == 0) q = Q;
println("{} {}", p, q);
}
ロロ宮