結果
問題 |
No.2843 Birthday Present Struggle
|
ユーザー |
![]() |
提出日時 | 2024-08-23 21:05:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 621 bytes |
コンパイル時間 | 1,913 ms |
コンパイル使用メモリ | 198,756 KB |
最終ジャッジ日時 | 2025-02-23 23:23:56 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 14 WA * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; int main() { int N; cin >> N; int ax, ay, bx, by, cx, cy; cin >> ax >> ay >> bx >> by >> cx >> cy; vector<pair<int, int>> ans; for (auto [dx, dy] : {pair{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}}) { int x = cx + dx; int y = cy + dy; if (x > N || x < 1 || y > N || y < 1) continue; ans.push_back({x, y}); } cout << ans.size() << endl; for (auto [x, y] : ans) { cout << x << ' ' << y << endl; } }