Submission #2164978


Source Code Expand

#include <iostream>
using namespace std;

int main(){
	char temp, S[5],C[5][5];
	int N, i, j;
	for(i=0;i<5;i++) cin >> S[i];
	for(i=0;i<4;i++){
		for(j=4;j>i;j--){
			if(C[j-1]>S[j]);
			temp = S[j];
			S[j] = S[j-1];
			S[j-1] = temp;
		}
	}
	for(i=0;i<5;i++){
		C[i][0]=S[i];
		for(j=0;j<5;j++){
			C[i+j]=S[
		}
	}
	cout << C[2*N] << endl;
}

Submission Info

Submission Time
Task A - 25個の文字列
User gobeyond
Language C++14 (GCC 5.4.1)
Score 0
Code Size 366 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if(C[j-1]>S[j]);
                 ^
./Main.cpp:20:3: error: expected primary-expression before ‘}’ token
   }
   ^
./Main.cpp:20:3: error: expected ‘]’ before ‘}’ token