結果
| 問題 |
No.2797 Square Tile
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-28 22:49:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 800 bytes |
| コンパイル時間 | 4,848 ms |
| コンパイル使用メモリ | 309,712 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 22:49:49 |
| 合計ジャッジ時間 | 6,430 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 21 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i,a,b) for(ll i = a; i < b; i++)
#define all(a) (a).begin(), (a).end()
bool chmin(auto &a, auto b){if(a > b){a = b; return true;} return false;}
bool chmax(auto &a, auto b){if(a < b){a = b; return true;} return false;}
int main(){
int a,b;
cin >> a >> b;
vector<array<int,2>> ans;
int mod = a * a + b * b;
array<int,2> nw = {0,0};
rep(i,0,(a*a+b*b)){
ans.push_back(nw);
nw[0] += a;
nw[1] += b;
nw[0] %= mod;
nw[1] %= mod;
}
rep(i,0,(ans.size())){
cout << ans[i][0] << " " << ans[i][1] << endl;
}
rep(i,0,(ans.size())){
cout << ans[i][0]+a << " " << ans[i][1] << endl;
}
}