답안 #1031965

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1031965 2024-07-23T09:12:18 Z 7again Laugh Analysis (IOI16_laugh) C++17
컴파일 오류
0 ms 0 KB
        }
        mx = max(mx  , ans[i]) ;
    }

    if(mx == 0)
    {
        cout << 0 ;
        return ;
    }
    cout << mx + 1 ;
}
main()
{
    //setIO("lasers") ;

    FAST ;

    int t = 1 ;
    //cin >> t ;

    while(t--)
        slv() ;
}

Compilation message

laugh.cpp:2:9: error: expected declaration before '}' token
    2 |         }
      |         ^
laugh.cpp:3:9: error: 'mx' does not name a type
    3 |         mx = max(mx  , ans[i]) ;
      |         ^~
laugh.cpp:4:5: error: expected declaration before '}' token
    4 |     }
      |     ^
laugh.cpp:6:5: error: expected unqualified-id before 'if'
    6 |     if(mx == 0)
      |     ^~
laugh.cpp:11:5: error: 'cout' does not name a type
   11 |     cout << mx + 1 ;
      |     ^~~~
laugh.cpp:12:1: error: expected declaration before '}' token
   12 | }
      | ^
laugh.cpp:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main()
      | ^~~~
laugh.cpp: In function 'int main()':
laugh.cpp:17:5: error: 'FAST' was not declared in this scope
   17 |     FAST ;
      |     ^~~~
laugh.cpp:23:9: error: 'slv' was not declared in this scope
   23 |         slv() ;
      |         ^~~