QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#73292#4388. C++ to PythonpoiAC ✓2ms3456kbC++1.1kb2023-01-23 15:04:062023-01-23 15:04:09

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-23 15:04:09]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3456kb
  • [2023-01-23 15:04:06]
  • 提交

answer

#include "iostream"
#include "cstring"
#include "cstdio"
#include "algorithm"
#include "queue"
#include "vector"
#include "queue"
#include "stack"
#include "ctime"
#include "set"
#include "map"
#include "cmath"
using namespace std;
#define fi first
#define se second
#define vi vector<int>
#define pb push_back
#define eb emplace_back
#define pii pair<int,int>
#define mp make_pair
#define rep( i , a , b ) for( int i = (a) , i##end = b ; i <= i##end ; ++ i )
#define per( i , a , b ) for( int i = (a) , i##end = b ; i >= i##end ; -- i )
#define mem( a ) memset( a , 0 , sizeof (a) )
#define all( x ) x.begin() , x.end()
//#define int long long
typedef long long ll;
const int MAXN = 2e5 + 10;
int n , m;
char ch[MAXN];

void solve() {
	scanf("%s",ch + 1);
	n = strlen( ch + 1 );
	rep( i , 1 , n ) if( ch[i] == '(' || ch[i] == ')' || ch[i] == ',' || ( ch[i] >= '0' && ch[i] <= '9' ) || ch[i] == '-' )
		putchar( ch[i] );
	puts("");
}

signed main() {
//	freopen("in","r",stdin);
//	freopen("out","w",stdout);
	int T;cin >> T;while( T-- ) solve();
//	solve();
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3456kb

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