Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
???int team[101],num=0,point,lank[101],co=0,flag=0;
???queue<int> que;
???string str;
???for(int i=1;i<101;i++)team[i]=-1;
???while(cin>>str){
??????if(str[0]=='0'&&str[2]=='0')break;
??????for(int i=0;;i++){
?????????if(str[i]==','){
????????????for(int j=0;j<i;j++)num+=(str[j]-'0')*(int)pow(10,i-j-1);
????????????team[num]=0;
????????????point=i;
?????????}
?????????else if(str[i]=='\0'){
????????????for(int j=point+1;j<i;j++)team[num]+=(str[j]-'0')*pow(10,i-j-1);
???????????????break;
?????????}
??????}
??????num=0;
???}
???point=0;
???for(int i=1;flag!=1;i++){
??????flag=1;
??????for(int j=1;j<101;j++){
?????????if(point<team[j]){
????????????flag=0;
????????????point=team[j];
????????????if(co!=0){
???????????????for(int k=0;k<co;k++)que.pop();

????????????}
????????????co=1;
????????????que.push(j);
?????????}
?????????else if(point==team[j]){
????????????flag=0;
????????????que.push(j);
????????????co++;
?????????}
??????}
??????for(int j=0;j<co;j++){
?????????lank[que.front()]=i;
?????????team[que.front()]=-1;
?????????que.pop();
??????}
??????point=0;co=0;
???}
???while(cin>>num)cout<<lank[num]<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      | ^
a.cc:5:2: error: expected primary-expression before '?' token
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |  ^
a.cc:5:3: error: expected primary-expression before '?' token
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |   ^
a.cc:5:4: error: expected primary-expression before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
a.cc:5:4: error: expected ':' before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
      |    :
a.cc:5:4: error: expected primary-expression before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
a.cc:5:4: error: expected ':' before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
      |    :
a.cc:5:4: error: expected primary-expression before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
a.cc:5:4: error: expected ':' before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
      |    :
a.cc:5:4: error: expected primary-expression before 'int'
    5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
      |    ^~~
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ???queue<int> que;
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ???queue<int> que;
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ???queue<int> que;
      |   ^
a.cc:6:15: error: expected primary-expression before 'que'
    6 | ???queue<int> que;
      |               ^~~
a.cc:6:14: error: expected ':' before 'que'
    6 | ???queue<int> que;
      |              ^~~~
      |              :
a.cc:6:15: error: 'que' was not declared in this scope
    6 | ???queue<int> que;
      |               ^~~
a.cc:6:18: error: expected ':' before ';' token
    6 | ???queue<int> que;
      |                  ^
      |                  :
a.cc:6:18: error: expected primary-expression before ';' token
a.cc:6:18: error: expected ':' before ';' token
    6 | ???queue<int> que;
      |                  ^
      |                  :
a.cc:6:18: error: expected primary-expression before ';' token
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ???string str;
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ???string str;
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ???string str;
      |   ^
a.cc:7:11: error: expected primary-expression before 'str'
    7 | ???string str;
      |           ^~~
a.cc:7:10: error: expected ':' before 'str'
    7 | ???string str;
      |          ^~~~
      |          :
a.cc:7:11: error: 'str' was not declared in this scope; did you mean 'std'?
    7 | ???string str;
      |           ^~~
      |           std
a.cc:7:14: error: expected ':' before ';' token
    7 | ???string str;
      |              ^
      |              :
a.cc:7:14: error: expected primary-expression before ';' token
a.cc:7:14: error: expected ':' before ';' token
    7 | ???string str;
      |              ^
      |              :
a.cc:7:14: error: expected primary-expression before ';' token
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |   ^
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |    ^~~
a.cc:8:16: error: 'i' was not declared in this scope
    8 | ???for(int i=1;i<101;i++)team[i]=-1;
      |                ^
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ???while(cin>>str){
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ???while(cin>>str){
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ???while(cin>>str){
      |   ^
a.cc:9:4: error: expected primary-expression before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
a.cc:9:4: error: expected ':' before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
a.cc:9:4: error: expected ':' before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
a.cc:9:4: error: expected ':' before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
      |    :
a.cc:9:4: error: expected primary-expression before 'while'
    9 | ???while(cin>>str){
      |    ^~~~~
a.cc:24:1: error: expected primary-expression before '?' token
   24 | ???point=0;
      | ^
a.cc:24:2: error: expected primary-expression before '?' token
   24 | ???point=0;
      |  ^
a.cc:24:3: error: expected primary-expression before '?' token
   24 | ???point=0;
      |   ^
a.cc:24:4: error: 'point' was not declared in this scope
   24 | ???point=0;
      |    ^~~~~
a.cc:24:11: error: expected ':' before ';' token
   24 | ???point=0;
      |           ^
      |           :
a.cc:24:11: error: expected primary-expression before ';' token
a.cc:24:11: error: expected ':' before ';' token
   24 | ???point=0;
      |           ^
      |           :
a.cc:24:11: error: expected primary-expression before ';' token
a.cc:24:11: error: expected ':' before ';' token
   24 | ???point=0;
      |           ^
      |           :
a.cc:24:11: error: expected primary-expression before ';' token
a.cc:25:1: error: expected primary-expression before '?' token
   25 | ???for(int i=1;flag!=1;i++){
      | ^
a.cc:25:2: error: expected primary-expression before '?' token
   25 | ???for(int i=1;flag!=1;i++){
      |  ^
a.cc:25:3: error: expected primary-expression before '?' token
   25 | ???for(int i=1;flag!=1;i++){
      |   ^
a.cc:25:4: error: expected primary-expression before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
a.cc:25:4: error: expected ':' before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
      |    :
a.cc:25:4: error: expected primary-expression before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
a.cc:25:4: error: expected ':' before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
      |    :
a.cc:25:4: error: expected primary-expression before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
a.cc:25:4: error: expected ':' before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
      |    :
a.cc:25:4: error: expected primary-expression before 'for'
   25 | ???for(int i=1;flag!=1;i++){
      |    ^~~
a.cc:25:16: error: 'flag' was not declared in this scope
   25 | ???for(int i=1;flag!=1;i++){
      |                ^~~~
a.cc:51:1: error: expected primary-expression before '?' token
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      | ^
a.cc:51:2: error: expected primary-expression before '?' token
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |  ^
a.cc:51:3: error: expected primary-expression before '?' token
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |   ^
a.cc:51:4: error: expected primary-expression before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
a.cc:51:4: error: expected ':' before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
      |    :
a.cc:51:4: error: expected primary-expression before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
a.cc:51:4: error: expected ':' before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
      |    :
a.cc:51:4: error: expected primary-expression before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
a.cc:51:4: error: expected ':' before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~
      |    :
a.cc:51:4: error: expected primary-expression before 'while'
   51 | ???while(cin>>num)cout<<lank[num]<<endl;
      |    ^~~~~