QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#505297#8785. Fake Coin and Lying Scalesucup-team4461Compile Error//C++202.2kb2024-08-05 01:24:422024-08-05 01:24:42

Details

answer.code:20:12: error: expected type-specifier before ‘typeof’
   20 | using ld = typeof(logl(1));
      |            ^~~~~~
answer.code:22:7: error: ‘ld’ does not name a type; did you mean ‘ll’?
   22 | const ld lg2 = logl(2);
      |       ^~
      |       ll
answer.code:23:7: error: ‘ld’ does not name a type; did you mean ‘ll’?
   23 | const ld lg3 = logl(3);
      |       ^~
      |       ll
answer.code:24:7: error: ‘ld’ does not name a type; did you mean ‘ll’?
   24 | const ld lg2pi = logl(2 * numbers::pi) / 2;
      |       ^~
      |       ll
answer.code:25:1: error: ‘ld’ does not name a type; did you mean ‘ll’?
   25 | ld lgn = logl(1);
      | ^~
      | ll
answer.code:27:1: error: ‘ld’ does not name a type; did you mean ‘ll’?
   27 | ld approx_fact_log(int n) {
      | ^~
      | ll
answer.code:31:1: error: ‘ld’ does not name a type; did you mean ‘ll’?
   31 | ld fact_n;
      | ^~
      | ll
answer.code:33:1: error: ‘ld’ does not name a type; did you mean ‘ll’?
   33 | ld approx_summand_log(int n, int i) {
      | ^~
      | ll
answer.code: In function ‘void solve()’:
answer.code:40:5: error: ‘lgn’ was not declared in this scope
   40 |     lgn = logl(n);
      |     ^~~
answer.code:41:5: error: ‘fact_n’ was not declared in this scope
   41 |     fact_n = approx_fact_log(n);
      |     ^~~~~~
answer.code:41:14: error: ‘approx_fact_log’ was not declared in this scope
   41 |     fact_n = approx_fact_log(n);
      |              ^~~~~~~~~~~~~~~
answer.code:46:5: error: ‘ld’ was not declared in this scope; did you mean ‘ll’?
   46 |     ld num = lg3 * n + logl(3ll * k + 1);
      |     ^~
      |     ll
answer.code:47:7: error: expected ‘;’ before ‘denom’
   47 |     ld denom = 0;
      |       ^~~~~~
      |       ;
answer.code:52:17: error: ‘approx_summand_log’ was not declared in this scope
   52 |             if (approx_summand_log(n, l1) > approx_summand_log(n, r1)) {
      |                 ^~~~~~~~~~~~~~~~~~
answer.code:58:11: error: expected ‘;’ before ‘m’
   58 |         ld m = -1;
      |           ^~
      |           ;
answer.code:59:38: error: ‘m’ was not declared in this scope
   59 |         for (int i = l; i <= r; i++) m = max(m, approx_summand_log(n, i));
      |                                      ^
answer.code:59:49: error: ‘approx_summand_log’ was not declared in this scope
   59 |         for (int i = l; i <= r; i++) m = max(m, approx_summand_log(n, i));
      |                                                 ^~~~~~~~~~~~~~~~~~
answer.code:60:9: error: ‘denom’ was not declared in this scope
   60 |         denom = m - logl(k) / 4;
      |         ^~~~~
answer.code:60:17: error: ‘m’ was not declared in this scope
   60 |         denom = m - logl(k) / 4;
      |                 ^
answer.code:62:42: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
   62 |     cout << setprecision(12) << fixed << num - denom << endl;
      |                                          ^~~
      |                                          enum
answer.code:62:48: error: ‘denom’ was not declared in this scope
   62 |     cout << setprecision(12) << fixed << num - denom << endl;
      |                                                ^~~~~