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_27284795_15515.cpp: In function 'int main()':
0_0_27284795_15515.cpp:18:3: error: expected ';' before 'cnt'
   cnt.resize(400);
   ^
0_0_27284795_15515.cpp:25:11: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
     cnt[i][a[i*400+j]]++;
           ^
0_0_27284795_15515.cpp:36:14: error: '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type' has no member named 'clear'
       cnt[i].clear();
              ^
0_0_27284795_15515.cpp:37:13: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
       cnt[i][k]=400;
             ^
0_0_27284795_15515.cpp:47:20: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
         if(--cnt[i][a[x]]==0)cnt[i].erase(a[x]);
                    ^
0_0_27284795_15515.cpp:47:37: error: '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type' has no member named 'erase'
         if(--cnt[i][a[x]]==0)cnt[i].erase(a[x]);
                                     ^
0_0_27284795_15515.cpp:49:15: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
         cnt[i][k]++;
               ^
0_0_27284795_15515.cpp:58:20: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
         if(--cnt[i][a[j]]==0)cnt[i].erase(a[j]);;
                    ^
0_0_27284795_15515.cpp:58:37: error: '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type' has no member named 'erase'
         if(--cnt[i][a[j]]==0)cnt[i].erase(a[j]);;
                                     ^
0_0_27284795_15515.cpp:60:15: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
         cnt[i][k]++;
               ^
0_0_27284795_15515.cpp:70:18: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::map<int, int> >::value_type {aka std::pair<const int, int>}' and 'int')
       ans+=cnt[i][k];
                  ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/alloc_traits.h:36:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_tree.h:65,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:60,
                 from 0_0_27284795_15515.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/alloc_traits.h: In instantiation of 'static void std::allocator_traits<_Alloc>::deallocate(_Alloc&, std::allocator_traits<_Alloc>::pointer, std::allocator_traits<_Alloc>::size_type) [with _Alloc = std::map<int, int>; std::allocator_traits<_Alloc>::pointer = std::pair<const int, int>*; std::allocator_traits<_Alloc>::size_type = long long unsigned int]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:178:37:   required from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(std::_Vector_base<_Tp, _Alloc>::pointer, std::size_t) [with _Tp = int; _Alloc = std::map<int, int>; std::_Vector_base<_Tp, _Alloc>::pointer = std::pair<const int, int>*; std::size_t = long long unsigned int]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:161:33:   required from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int; _Alloc = std::map<int, int>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:257:15:   required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = std::map<int, int>]'
0_0_27284795_15515.cpp:7:26:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/alloc_traits.h:383:9: error: 'class std::map<int, int>' has no member named 'deallocate'
       { __a.deallocate(__p, __n); }
         ^


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-11-25 16:36:23, Gzip enabled