제출 #163194

#제출 시각아이디문제언어결과실행 시간메모리
163194TadijaSebez라멘 (JOI14_ramen)C++11
100 / 100
7 ms392 KiB
#include "ramen.h" #include <bits/stdc++.h> using namespace std; void Ramen(int n) { int mn=-1,mx=-1; if(n&1) mn=mx=0; for(int i=n&1;i<n;i+=2) { if(Compare(i,i+1)==-1) { if(mn==-1 || Compare(mn,i)==1) mn=i; if(mx==-1 || Compare(mx,i+1)==-1) mx=i+1; } else { if(mn==-1 || Compare(mn,i+1)==1) mn=i+1; if(mx==-1 || Compare(mx,i)==-1) mx=i; } } Answer(mn,mx); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...