제출 #828998

#제출 시각아이디문제언어결과실행 시간메모리
828998TrunktyArranging Shoes (IOI19_shoes)C++14
45 / 100
64 ms69848 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; //#define int ll #include "shoes.h" ll ans,nextpos=1; deque<int> shoes[100005]; ll count_swaps(vector<int> s){ for(ll i=0;i<s.size();i++){ if(s[i]<0){ shoes[-s[i]].push_back(nextpos); ans += abs(nextpos-(i+1LL)); nextpos += 2; } } return ans; }

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

shoes.cpp: In function 'll count_swaps(std::vector<int>)':
shoes.cpp:12:14: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |  for(ll i=0;i<s.size();i++){
      |             ~^~~~~~~~~
#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...