結果
| 問題 |
No.2041 E-mail Address
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-04 05:57:48 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,320 bytes |
| コンパイル時間 | 6,377 ms |
| コンパイル使用メモリ | 333,716 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-03-04 05:57:56 |
| 合計ジャッジ時間 | 6,205 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
namespace my{
#define ST(...) string __VA_ARGS__;lin(__VA_ARGS__)
#define FO(n) for(ll ij=n;ij-->0;)
#define FOR(i,...) for(auto[i,i##stop,i##step]=range(0,__VA_ARGS__);i<i##stop;i+=i##step)
#define fo(i,...) FO##__VA_OPT__(R)(i __VA_OPT__(,__VA_ARGS__))
#define single_testcase void solve();}int main(){my::io();my::solve();}namespace my{
void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<<fixed<<setprecision(15);}
using ll=long long;
constexpr auto range(bool s,auto...a){array<ll,3>r{0,0,1};ll I=0;((r[I++]=a),...);if(!s&&I==1)swap(r[0],r[1]);r[0]-=s;if(s)r[2]*=-1;return r;}
constexpr char newline=10;
constexpr char space=32;
constexpr auto schrodinger(bool p,char c){return string(p,c);}
void lin(auto&...a){(cin>>...>>a);}
void pp(auto&&...a){ll n=sizeof...(a);((cout<<a<<schrodinger(--n>0,space)),...);cout<<newline;}
struct string:std::string{
using std::string::string;
string(const std::string&s):std::string(s){}
ll size()const{return std::string::size();}
auto&operator*=(ll t){auto x=*this;fo(t-1)*this+=x;return*this;}
auto operator*(ll t)const{return string{*this}*=t;}
};
single_testcase
void solve(){
ST(s);
ll l=s.find_first_of("("),r=s.find_first_of(")");
pp(s.substr(0,l)+"@"+s.substr(r+1,s.size()-r-1));
}}