結果
| 問題 |
No.2843 Birthday Present Struggle
|
| コンテスト | |
| ユーザー |
H1rano
|
| 提出日時 | 2024-08-24 17:30:26 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 653 bytes |
| コンパイル時間 | 4,716 ms |
| コンパイル使用メモリ | 275,344 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-24 17:30:33 |
| 合計ジャッジ時間 | 5,312 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using S = pair<long, long>;
S operator + (S p, S q){ return {p.first + q.first, p.second + q.second}; }
S operator - (S p, S q){ return {p.first - q.first, p.second - q.second}; }
auto &operator >> (auto &is, S &p){
is >> p.first >> p.second;
return is;
}
auto &operator << (auto &is, S p){
is << p.first << ' ' << p.second;
return is;
}
int main(){
int N; cin >> N;
S s, l, g; cin >> s >> l >> g;
cout << 4 << endl;
cout << (g + pair{ 0, 1}) << endl;
cout << (g + pair{ 1, 0}) << endl;
cout << (g + pair{0, -1}) << endl;
cout << (g + pair{-1, 0}) << endl;
}
H1rano