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_21312139_24485.cpp: In function 'int main()':
0_0_21312139_24485.cpp:46:27: error: 'mod' was not declared in this scope
    num[i] = {t >> 16, t % mod};
                           ^
0_0_21312139_24485.cpp:46:11: error: no match for 'operator=' (operand types are 'P {aka std::pair<int, int>}' and '<brace-enclosed initializer list>')
    num[i] = {t >> 16, t % mod};
           ^
0_0_21312139_24485.cpp:46:11: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_21312139_24485.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:158:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = int; _T2 = int]
       operator=(const pair& __p)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:158:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::pair<int, int>&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:166:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) [with _T1 = int; _T2 = int]
       operator=(pair&& __p)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:166:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::pair<int, int>&&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:177:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(const pair<_U1, _U2>& __p)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:177:2: note:   template argument deduction/substitution failed:
0_0_21312139_24485.cpp:46:11: note:   couldn't deduce template parameter '_U1'
    num[i] = {t >> 16, t % mod};
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_21312139_24485.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:186:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(pair<_U1, _U2>&& __p)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:186:2: note:   template argument deduction/substitution failed:
0_0_21312139_24485.cpp:46:11: note:   couldn't deduce template parameter '_U1'
    num[i] = {t >> 16, t % mod};
           ^


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-09-28 03:28:24, Gzip enabled