#include<bits/stdc++.h>
using namespace std;
map< int ,bool > dp;
int n;
bool state( ll x) {
if ( x >= n) return false ;
if ( dp.count ( x) ) return dp[ x] ;
for ( int i = 2 ; i < 10 ; i++ ) if ( ! state( x * i) ) return dp[ x] = true ;
return dp[ x] = false ;
}
int main( ) {
int t;
while ( scanf ( "%d" , & n) ! = EOF ) {
dp.clear ( ) ;
if ( state( 1 ) ) cout << "Stan wins.\n " ;
else cout << "Ollie wins.\n " ;
}
return 0 ;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKbWFwPGludCxib29sPiBkcDsKaW50IG47CmJvb2wgc3RhdGUobGwgeCkgewoJaWYoeCA+PSBuKSByZXR1cm4gZmFsc2U7CglpZihkcC5jb3VudCh4KSkgcmV0dXJuIGRwW3hdOwoJZm9yKGludCBpID0gMjsgaSA8IDEwOyBpKyspIGlmKCFzdGF0ZSh4ICogaSkpIHJldHVybiBkcFt4XSA9IHRydWU7CglyZXR1cm4gZHBbeF0gPSBmYWxzZTsKfQppbnQgbWFpbigpIHsKCWludCB0OwoJd2hpbGUoc2NhbmYoIiVkIiwgJm4pICE9IEVPRikgewoJCWRwLmNsZWFyKCk7CgkJaWYoc3RhdGUoMSkpIGNvdXQgPDwgIlN0YW4gd2lucy5cbiI7CgkJZWxzZSBjb3V0IDw8ICJPbGxpZSB3aW5zLlxuIjsKCX0KCXJldHVybiAwOwp9
compilation info
prog.cpp:5:12: error: 'll' was not declared in this scope
bool state(ll x) {
^
prog.cpp:5:18: error: expected ',' or ';' before '{' token
bool state(ll x) {
^
prog.cpp: In function 'int main()':
prog.cpp:15:13: error: 'state' cannot be used as a function
if(state(1)) cout << "Stan wins.\n";
^
stdout