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_39306992_12971.cpp:6:1: error: 'string' does not name a type
    6 | string s1, s2;
      | ^~~~~~
0_0_39306992_12971.cpp: In function 'void solve()':
0_0_39306992_12971.cpp:13:29: error: 's1' was not declared in this scope
   13 |                         if (s1[i] == s2[j])dp[j + 1] = dp[j] + 1;
      |                             ^~
0_0_39306992_12971.cpp:13:38: error: 's2' was not declared in this scope
   13 |                         if (s1[i] == s2[j])dp[j + 1] = dp[j] + 1;
      |                                      ^~
0_0_39306992_12971.cpp:14:42: error: 'max' was not declared in this scope
   14 |                         else dp[j + 1] = max(dp[j + 1], dp[j]);
      |                                          ^~~
0_0_39306992_12971.cpp:14:42: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
                 from 0_0_39306992_12971.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5805:5: note:   'std::max'
 5805 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:63:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:2928:29: note:   'std::ranges::max'
 2928 |   inline constexpr __max_fn max{};
      |                             ^~~
0_0_39306992_12971.cpp: In function 'int main()':
0_0_39306992_12971.cpp:22:9: error: 'ios' has not been declared
   22 |         ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
      |         ^~~
0_0_39306992_12971.cpp:22:34: error: 'cin' was not declared in this scope
   22 |         ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
      |                                  ^~~
0_0_39306992_12971.cpp:22:46: error: 'cout' was not declared in this scope
   22 |         ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
      |                                              ^~~~
0_0_39306992_12971.cpp:24:23: error: 's1' was not declared in this scope
   24 |         while (cin >> s1 >> s2)
      |                       ^~
0_0_39306992_12971.cpp:24:29: error: 's2' was not declared in this scope
   24 |         while (cin >> s1 >> s2)
      |                             ^~


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 15:30:40, Gzip enabled