제출 #1054613

#제출 시각아이디문제언어결과실행 시간메모리
1054613LittleOrange버섯 세기 (IOI20_mushrooms)C++17
10 / 100
128 ms596 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; using ll = long long; int count_mushrooms(int n) { ll ans = 1; ll cur = 1; for(ll i = 1;i<n;i++){ cur^=use_machine({i-1,i}); ans += cur; } return ans; }

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

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:10:22: warning: narrowing conversion of '(i - 1)' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
   10 |   cur^=use_machine({i-1,i});
      |                     ~^~
mushrooms.cpp:10:22: warning: narrowing conversion of '(i - 1)' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
mushrooms.cpp:10:25: warning: narrowing conversion of 'i' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
   10 |   cur^=use_machine({i-1,i});
      |                         ^
mushrooms.cpp:10:25: warning: narrowing conversion of 'i' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
#Verdict Execution timeMemoryGrader output
Fetching results...