結果
| 問題 | No.2143 Only One Bracket |
| コンテスト | |
| ユーザー |
👑 Nachia
|
| 提出日時 | 2024-04-21 16:43:27 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 402 bytes |
| 記録 | |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 93,876 KB |
| 実行使用メモリ | 11,908 KB |
| 最終ジャッジ日時 | 2026-07-04 15:12:07 |
| 合計ジャッジ時間 | 1,313 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <utility>
using namespace std;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
int main(){
ios::sync_with_stdio(false); cin.tie(nullptr);
int N; cin >> N;
rep(i,N){
cout << string(i, ')');
if(i != N-1) cout << string(i+1, '(');
cout << '\n';
}
return 0;
}
Nachia