結果
問題 |
No.2797 Square Tile
|
ユーザー |
|
提出日時 | 2024-06-28 22:26:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 590 bytes |
コンパイル時間 | 2,696 ms |
コンパイル使用メモリ | 242,424 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 22:26:07 |
合計ジャッジ時間 | 3,962 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | WA * 21 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1<<30; const long long INFLL = 1LL<<60; const int MOD = 998244353; int a, b; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> a >> b; int c = a * a + b * b; int x = 0; int y = 0; for (int i = 0; i < c; i++){ cout << x << " " << y << '\n'; x = (x + a) % c; y = (y + b) % c; } x = 0; y = a; for (int i = 0; i < c; i++){ cout << x << " " << y << '\n'; x = (x + b) % c; y = (y + a) % c; } }