結果

問題 No.2797 Square Tile
ユーザー Jeroen Op de Beek
提出日時 2024-06-28 22:08:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,297 bytes
コンパイル時間 2,090 ms
コンパイル使用メモリ 192,212 KB
最終ジャッジ日時 2025-02-22 01:08:57
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define all(x) x.begin(),x.end()
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << p.first << " " << p.second; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { string sep; for (const T &x : v) os << sep << x, sep = " "; return os; }
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#define ASSERT(...) 42
#endif
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pi;
const int oo = 1e9;
// #include "geodeb.h"
int main() {
    // GD_INIT("c.html");
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a,b; cin >> a >> b;
    // for(int i=0;i<a*a+b*b;++i) {
    //     int x,y; cin >> x >> y;
    //     GD_RECT(x,y,x+a,y+a,"black:green");
    // }
    // for(int i=0;i<a*a+b*b;++i) {
    //     int x,y; cin >> x >> y;
    //     GD_RECT(x,y,x+b,y+b,"black:red");
    // }
    int L = a*a+b*b;
    for(int i=0;i<L;++i) {
        cout << (ll(i)*a)%L << ' ' << (ll(i)*b)%L << '\n';
    }
    for(int i=0;i<L;++i) {
        cout << (ll(i+1)*a)%L << ' ' << (ll(i)*b)%L << '\n';
    }

}
0