結果
問題 |
No.2041 E-mail Address
|
ユーザー |
|
提出日時 | 2022-08-19 21:22:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 938 bytes |
コンパイル時間 | 1,552 ms |
コンパイル使用メモリ | 167,680 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 07:18:47 |
合計ジャッジ時間 | 2,264 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
/*______ || | ||ACはこちらへ| || | || ̄ ̄ ̄ ̄ ̄ ̄ ∧_∧|| (`・ω・|| ( つ||0 uーu*/ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (ll i = 0; i < n; ++ i) #define all(x) (x).begin(),(x).end() #define rall(x) (x).begin(),(x).end() using ll = long long ; using P = pair<ll,ll>; using PP = pair<ll,P>; using vi = vector<ll>; using vb = vector<bool>; using vs = vector<string>; using vp = vector<P>; using vvi = vector<vi>; using vvvi = vector<vvi>; const ll INF = 1e17; const int inf = 1001001001; const int dx[4]={1,-1,0,0}; const int dy[4]={0,0,1,-1}; const ll mod=998244353; int main(){ string s; cin >> s; int n = s.size(); string t = ""; bool k = true; rep(i,n){ if(s[i]=='(') k = false; if(s[i] ==')') {k = true; t+='@';} else if(k) t +=s[i]; } cout<<t<<endl; }