Submission #283047

#TimeUsernameProblemLanguageResultExecution timeMemory
283047IWANTTOGETGOLDINIOIArranging Shoes (IOI19_shoes)C++14
0 / 100
1 ms256 KiB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mk make_pair
#define pb push_back
#define F first
#define S second
 
int count_swaps( vector < int > vc ){
	if (vc[0] < 0== vc[1] > 0) {
		return 0;
	} 
	else if (vc[0] > 0 && vc[1] < 0) {
		return 1;
	}
	else {
		return 2;
	}
}

Compilation message (stderr)

shoes.cpp: In function 'int count_swaps(std::vector<int>)':
shoes.cpp:10:12: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
   10 |  if (vc[0] < 0== vc[1] > 0) {
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...