QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#92574#4388. C++ to Pythonzbceyond#AC ✓1ms3412kbC++20775b2023-03-30 19:00:402023-03-30 19:00:42

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-30 19:00:42]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3412kb
  • [2023-03-30 19:00:40]
  • 提交

answer

#include<bits/stdc++.h>
#define rep(i,x,y) for(int i=x;i<=y;i++)
#define per(i,x,y) for(int i=x;i>=y;i--)
using namespace std;
const int N=1e6+10;
const int mod=998244353;
#define int long long
int qmi(int a,int b){//mod别弄错了
    int res=1;
    for(;b;b>>=1,a=a*a%mod)
        if(b&1)res=res*a%mod;
    return res;
}
void solve() {
    string s;cin>>s;
    for(auto ch:s){
        if(ch=='(' or ch==')' or ch==',' or (ch>='0' and ch<='9') or ch=='-')cout<<ch;
    }
    cout<<"\n";
}
signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int tc = 1;
    cin >> tc;
    for (int i = 1; i <= tc; i++) {
        solve();
    }
}
//2
//std::make_tuple(-2,3,3,std::make_tuple(3,3))
//std::make_tuple(std::make_tuple(1,1,4,5,1,4))

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3412kb

input:

100
std::make_tuple(-2,-2,4,-5,std::make_tuple(std::make_tuple(2,1,-4,5,-3),std::make_tuple(std::make_tuple(std::make_tuple(std::make_tuple(5,std::make_tuple(std::make_tuple(-4,std::make_tuple(std::make_tuple(std::make_tuple(0,std::make_tuple(std::make_tuple(std::make_tuple(1,-1,-3,-5,4),std::make_t...

output:

(-2,-2,4,-5,((2,1,-4,5,-3),((((5,((-4,(((0,(((1,-1,-3,-5,4),(((0,(2,(((-4,-2,2,-1,5,((0,4),-2)),-5,-2),-5,3),-5)),5),0,3)),-3,-5)),3),4,5)),5)),1),5,4),4,-1)),-5,-3)
(-5,4,-2,5,(-4,(0,(((-5,(4,((0,(4,((2,-3,-1,-3,-2),((-1,((-3,(1,((2,(((-1,(2,(-3,((5,0),4),-2),4)),0),2,-4)),-1),-3)),-5)),-2)),-3)),0...

result:

ok 100 lines