Problem smokeflower
User Mashulyong
Submission Time 2023-02-17 14:34:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

smokeflower.cpp: In function ‘int main()’:
smokeflower.cpp:7:12: error: ‘sync_with_studio’ is not a member of ‘std::ios_base’
7 | ios_base::sync_with_studio(false); cin.tie(0); cout.tie(0);
| ^~~~~~~~~~~~~~~~
smokeflower.cpp:9:7: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
9 | cout >> rand()%4+1;
| ~~~~ ^~ ~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
smokeflower.cpp:9:7: note: candidate: ‘operator>>(int, int)’ <built-in>
9 | cout >> rand()%4+1;
| ~~~~~^~~~~~~~~~~~~
smokeflower.cpp:9:7: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,
from smokeflower.cpp:1:
/us