Submission #827918

#TimeUsernameProblemLanguageResultExecution timeMemory
827918smatcsuArranging Shoes (IOI19_shoes)C++17
0 / 100
1 ms212 KiB
#include<bits/stdc++.h> #define ll long long using namespace std; vector<ll> v; ll count_swaps(vector<int> v){ if(v[0]=(-v[1]) and v[0]<=0 and v[1]>=0) return 0; else{ if(v[1]=(-v[0]) and v[1]<=0 and v[0]>=0) return 1; else return -1; } }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:8:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    8 |     if(v[0]=(-v[1]) and v[0]<=0 and v[1]>=0) return 0;
shoes.cpp:10:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   10 |         if(v[1]=(-v[0]) and v[1]<=0 and v[0]>=0) return 1;
#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...