結果

問題 No.2143 Only One Bracket
ユーザー 👑 NachiaNachia
提出日時 2022-12-02 22:11:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WJ  
(最新)
AC  
(最初)
実行時間 -
コード長 689 bytes
最終ジャッジ日時 2024-04-18 06:30:13
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <atcoder/modint.hpp>

using namespace std;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
const i64 INF = 1001001001001001001;

using Modint = atcoder::modint998244353;

int main(){
    int N; cin >> N;
    rep(i,N){
        cout << string(i, ')');
        if(i != N-1) cout << string(i+1, '(');
        cout << '\n';
    }
    return 0;
}


struct ios_do_not_sync{
    ios_do_not_sync(){
        std::ios::sync_with_stdio(false);
        std::cin.tie(nullptr);
    }
} ios_do_not_sync_instance;


0