F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38803369_2711.cpp: In lambda function:
0_0_38803369_2711.cpp:14:11: error: 'map' is not captured
   14 |       if (map.count(now)) return map[now];
      |           ^~~
0_0_38803369_2711.cpp:11:18: note: the lambda has no capture-default
   11 |   auto search = [](ll n) {
      |                  ^
0_0_38803369_2711.cpp:10:31: note: 'std::unordered_map<long long int, int> map' declared here
   10 |   std::unordered_map<ll, int> map;
      |                               ^~~
0_0_38803369_2711.cpp:14:34: error: 'map' is not captured
   14 |       if (map.count(now)) return map[now];
      |                                  ^~~
0_0_38803369_2711.cpp:11:18: note: the lambda has no capture-default
   11 |   auto search = [](ll n) {
      |                  ^
0_0_38803369_2711.cpp:10:31: note: 'std::unordered_map<long long int, int> map' declared here
   10 |   std::unordered_map<ll, int> map;
      |                               ^~~
0_0_38803369_2711.cpp:15:14: error: 'map' is not captured
   15 |       return map[now] = 1 + std::min(self(self, now / 3) + int(now % 3),
      |              ^~~
0_0_38803369_2711.cpp:11:18: note: the lambda has no capture-default
   11 |   auto search = [](ll n) {
      |                  ^
0_0_38803369_2711.cpp:10:31: note: 'std::unordered_map<long long int, int> map' declared here
   10 |   std::unordered_map<ll, int> map;
      |                               ^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-10-06 06:28:31, Gzip enabled