Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
	string sent;
	string word[500];
	int a[500]={};
	int i,j,k,l;
	int n,m,len;
	i=0;
	while(cin>>sent){
		if(i==0){	//????????????????????????
			word[0]=sent;
			a[0]++;
			i++;
			len=sent.size();
			n=0;
		}
		else {
			if(len<sent.size()){	//?????????????????????????????°??´??°
				len=sent.size();
				n=i;
			}
			for(j=0; j<i; j++){
				if(sent==word[j]){???//?????§????????????????????????
					a[j]++;
					break;
				}
				if(j==i-1){			//??°?????????????????????
					word[i]=sent;
					a[i]++;
					i++;
					break;
				}
			}
		}
	}
	m=0;
	for(j=0; j<i; j++){???	//????????????????????????????????????
		if(m<a[j])m=j;
	}
	cout<<word[m]<<" "<<word[n]<<endl;
	// for(j=0; j<i; j++){
	// 	cout<<word[j]<<":"<<a[j]<<endl;
	// }
	//cout<<"len:"<<len<<" "<<word[n]<<endl;
	return 0;
}

Compiler output:
a.cc:27:52: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   27 |                                 if(sent==word[j]){???//?????§????????????????????????
a.cc: In function 'int main()':
a.cc:27:51: error: expected primary-expression before '?' token
   27 |                                 if(sent==word[j]){???//?????§????????????????????????
      |                                                   ^
a.cc:27:52: error: expected primary-expression before '?' token
   27 |                                 if(sent==word[j]){???//?????§????????????????????????
      |                                                    ^
a.cc:27:53: error: expected primary-expression before '?' token
   27 |                                 if(sent==word[j]){???//?????§????????????????????????
      |                                                     ^
a.cc:28:47: error: expected ':' before ';' token
   28 |                                         a[j]++;
      |                                               ^
      |                                               :
a.cc:28:47: error: expected primary-expression before ';' token
a.cc:28:47: error: expected ':' before ';' token
   28 |                                         a[j]++;
      |                                               ^
      |                                               :
a.cc:28:47: error: expected primary-expression before ';' token
a.cc:28:47: error: expected ':' before ';' token
   28 |                                         a[j]++;
      |                                               ^
      |                                               :
a.cc:28:47: error: expected primary-expression before ';' token
a.cc:41:28: error: expected primary-expression before '?' token
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                            ^
a.cc:41:29: error: expected primary-expression before '?' token
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                             ^
a.cc:41:30: error: expected primary-expression before '?' token
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                              ^
a.cc:42:17: error: expected primary-expression before 'if'
   42 |                 if(m<a[j])m=j;
      |                 ^~
a.cc:41:32: error: expected ':' before 'if'
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                               ^~
      |                                :
   42 |                 if(m<a[j])m=j;
      |                 ~~             
a.cc:42:17: error: expected primary-expression before 'if'
   42 |                 if(m<a[j])m=j;
      |                 ^~
a.cc:41:32: error: expected ':' before 'if'
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                               ^~
      |                                :
   42 |                 if(m<a[j])m=j;
      |                 ~~             
a.cc:42:17: error: expected primary-expression before 'if'
   42 |                 if(m<a[j])m=j;
      |                 ^~
a.cc:41:32: error: expected ':' before 'if'
   41 |         for(j=0; j<i; j++){???  //????????????????????????????????????
      |                               ^~
      |                                :
   42 |                 if(m<a[j])m=j;
      |                 ~~             
a.cc:42:17: error: expected primary-expression before 'if'
   42 |                 if(m<a[j])m=j;
      |                 ^~