結果
| 問題 | No.466 ジオラマ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-21 15:24:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 537 bytes |
| 記録 | |
| コンパイル時間 | 1,067 ms |
| コンパイル使用メモリ | 73,564 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-14 12:17:42 |
| 合計ジャッジ時間 | 9,825 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 47 WA * 36 |
ソースコード
#include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c>>d;
if(a+b-c-1>d){cout<<-1<<endl;return 0;}
cout<<a+b-c<<" "<<a+b-c-1<<endl;
vector<pair<int,int>> ans;
ans.push_back(make_pair(0,2));
for(int i=2;i<a;i++)ans.push_back(make_pair(i,i+1));
ans.push_back(make_pair(1,a+1));
for(int i=a+1;i<a+b-c-1;i++)ans.push_back(make_pair(i,i+1));
if(c)ans.push_back(make_pair(a+b-c-1,a-c+1));
for(auto i:ans)cout<<i.first<<" "<<i.second<<endl;
return 0;
}