結果

問題 No.2843 Birthday Present Struggle
ユーザー eve__fuyuki
提出日時 2024-08-23 21:32:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 1,941 ms
コンパイル使用メモリ 196,616 KB
最終ジャッジ日時 2025-02-23 23:32:42
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

void fast_io() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
}

int main() {
	fast_io();
	int n;
	cin >> n;
	int ax, ay, bx, by, cx, cy;
	cin >> ax >> ay >> bx >> by >> cx >> cy;
	vector<pair<int, int>> ans;
	for (int di = -1; di <= 1; di += 2) {
		for (int dj = -1; dj <= 1; dj += 2) {
			int x = cx + di;
			int y = cy + dj;
			if (x >= 1 && x <= n && y >= 1 && y <= n) {
				ans.push_back({x, y});
			}
		}
	}
	cout << ans.size() << '\n';
	for (auto [x, y] : ans) {
		cout << x << ' ' << y << '\n';
	}
}
0