考验人品の代码

wuhongzhen 2020-11-14 10:30:56 2022-04-03 14:17:14 29 返回题目

#include<bits/stdc++.h>
using namespace std;
int main() {
string a;
cin>>a;
srand(time(NULL));
if(rand()%2==0)
cout<<"OK";
else
cout<<"Wrong";
return 0;
}
{{ vote && vote.total.up }}

共 6 条回复

LS_chenyiming

🍓🍫🍯🍛🍖🍔

jinpeiyu

这是人性的扭曲还是道德的沦丧???

jinpeiyu
#include <bits/stdc++.h>
using namespace std;
stack<char> c;
int main(){
	string l;
	cin>>l;
	int n=l.size();
	c.push('!');
	for(int i=0;i<n;i++){
		if(l[i]==')'){if( c.top()=='(')c.pop();else {cout<<"Wrong";return 0;}}
		else if(l[i]==']'){if( c.top()=='[')c.pop();else {cout<<"Wrong";return 0;}}
		else c.push(l[i]);
	}
	if(c.size()==1)cout<<"OK"<<endl;
	else cout<<"Wrong"<<endl;
	return 0;
}
wuhongzhen

az

WURUILANG

答案不对

j20080904

👍🙌😂🤦‍♂️🎉🌹✔😆