제출 #784250

#제출 시각아이디문제언어결과실행 시간메모리
784250HD1Arranging Shoes (IOI19_shoes)C++14
10 / 100
1 ms212 KiB
//we are all lost trying to be someone. #include "shoes.h" #include <bits/stdc++.h> #define fastio ios_base::sync_with_stdio(0); cin.tie(0); #define sz(x) ll(x.size()) #define reve(x) reverse(x.begin(),x.end()) #define ff first #define ss second #define pb push_back using namespace std; typedef int ll; typedef long double ld; typedef pair<ll,ll> ii; typedef pair<ll, ii >tri; const ll MAX=1e7+100; const ll mod=1e9; const ll inf=1e9; long long count_swaps(vector<int> c){ ll pos=0; ll sum=0; ll aux=-1; for(ll i=0; i<sz(c); i++){ if(c[i]==-1 and i!=pos){ sum+=i; pos+=2; } } return sum; }

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

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:21:8: warning: unused variable 'aux' [-Wunused-variable]
   21 |     ll aux=-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...