QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#279031 | #5436. DRX vs. T1 | Jalppatel1428 | Compile Error | / | / | C++14 | 307b | 2023-12-08 03:22:02 | 2023-12-08 03:22:02 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int solve(){
string str;
cin>>str;
int cnt=0;
for(int i=0;i<n;i++){
cnt+=(str[i]=='T');
cnt-=(str[i]=='D');
}
if(cnt>0)cout<<"T1"<<endl;
else cout<<"RDX"<<endl;
}
int main(){
int tc;
cin>>tc;
while(tc--)solve();
return 0;
}
Details
answer.code: In function ‘int solve()’: answer.code:8:23: error: ‘n’ was not declared in this scope 8 | for(int i=0;i<n;i++){ | ^ answer.code:14:1: warning: no return statement in function returning non-void [-Wreturn-type] 14 | } | ^