제출 #429763

#제출 시각아이디문제언어결과실행 시간메모리
429763dreezy비스킷 담기 (IOI20_biscuits)C++17
컴파일 에러
0 ms0 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; /* subtask1 : brutazo*/ /*subtask 2 easy brutazo*/ /*** answer is you either chose a bit or you dont but, when we have multiple of the same bits we get repetition we need to count how many times that happens if they were all differente then answer is a.size() chose x we need to count repetitions 2^2 + 2^2 + 2^4 == 8 + 16 = 24 2^3 + 2^3 + 2^3 = 8 + 8 + 8 = 16 */ long long count_tastiness(long long x, vector<long long> a) { ll ans = 0; //vector that stores how many bits we can use to make this power of two for(int pow : a) ans+= pow!= 0; return ans; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:28:2: error: 'll' was not declared in this scope
   28 |  ll ans = 0;
      |  ^~
biscuits.cpp:33:4: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |    ans+= pow!= 0;
      |    ^~~
      |    abs
biscuits.cpp:35:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |  return ans;
      |         ^~~
      |         abs