제출 #306404

#제출 시각아이디문제언어결과실행 시간메모리
306404amunduzbaevArranging Shoes (IOI19_shoes)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#define int long long
using namespace std;
int t,n;
main(){
	cin>>t;
	while(t--){
		cin>>n;
		vector<int>v(n);
		for(int i=0;i<n;i++){
			cin>>v[i];
		}
		bool ok=0;
		for(int i=1;i<n;i++){
			if(v[i]>=v[i-1]){
				ok=1;
				break;
			}
		}
		if(ok)
		cout<<"YESn";
		else
		cout<<"NO\n";
	}
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

shoes.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      |      ^
/tmp/cc3TXhQQ.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccQQt3Gy.o:shoes.cpp:(.text.startup+0x0): first defined here
/tmp/cc3TXhQQ.o: In function `main':
grader.cpp:(.text.startup+0x26a): undefined reference to `count_swaps(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status