結果
問題 | No.2843 Birthday Present Struggle |
ユーザー | n0ma_ru |
提出日時 | 2024-08-23 21:07:02 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 864 bytes |
コンパイル時間 | 2,428 ms |
コンパイル使用メモリ | 203,244 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-23 21:07:07 |
合計ジャッジ時間 | 3,933 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 34 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define ALL(v) v.begin(),v.end() #define dbg(x) cerr << #x << ": " << (x) << endl; template<class F, class S> ostream& operator<<(ostream& os, pair<F,S>& p) { os << '(' << p.first << ',' << p.second << ')'; return os; } template<class Iter> void print(Iter beg, Iter end) { for (Iter itr = beg; itr != end; ++itr) { cerr << *itr << ' '; } cerr << '\n'; } inline bool naraba(bool a, bool b) { return (!a || b); } int N; vector<pair<int,int>> P(3); int main() { cin >> N; for (auto& [x,y] : P) cin >> x >> y; int dx[] = {-1,0,1,0,-1}; cout << 4 << '\n'; for (int i = 0; i < 4; ++i) { int x = P[2].first; int y = P[2].second; int nx = x + dx[i]; int ny= y + dx[i+1]; cout << nx << ' ' << ny << '\n'; } }