結果
| 問題 |
No.1519 Diversity
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-10 01:50:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 322 bytes |
| コンパイル時間 | 1,793 ms |
| コンパイル使用メモリ | 195,768 KB |
| 最終ジャッジ日時 | 2025-02-08 19:29:05 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
vector<array<int,2>>E;
for(int i=1,j=N-1;i<j;i++,j--){
for(int k=i;k<j;k++){
E.push_back({k+1,j+1});
}
}
cout<<E.size()<<'\n';
for(auto i:E)cout<<i[0]<<' '<<i[1]<<'\n';
}