版本比较
题解:CF107D Crime Management
正文
增加 7 行删除 7 行
12 行未改动131415161718192021222324252627282930313233343536373839404142139 行未改动全部展开1821831841851861871881891907 行未改动12 行未改动code:```cpp#include <bits/stdc++.h>using namespace std;#define int long long#define fir first#define sec second#define mkp make_pair#define pb push_back#define lep( i, l, r ) for ( int i = ( l ); i <= ( r ); ++ i )#define rep( i, r, l ) for ( int i = ( r ); i >= ( l ); -- i )typedef long long ll;typedef long double ld;typedef unsigned long long ull;typedef pair < int, int > pii;char _c; bool _f; template < class type > inline void read ( type &x ) {_f = 0, x = 0;while ( _c = getchar (), !isdigit ( _c ) ) if ( _c == '-' ) _f = 1;while ( isdigit ( _c ) ) x = x * 10 + _c - '0', _c = getchar (); if ( _f ) { x = -x; }}template < class type > inline void chkmin ( type &x, type y ) { x = ( x <= y ? x : y ); }template < class type > inline void chkmax ( type &x, type y ) { x = ( x >= y ? x : y ); }const int N = 1e3 + 5;139 行未改动全部展开p = mul ( p, base );dfs3 ( 0 );cout << ans;}signed main () {#ifdef judgefreopen ( "Code.in", "r", stdin );freopen ( "Code.out", "w", stdout );7 行未改动12 行未改动131415161718192021222324252627282930313233343536373839404142139 行未改动全部展开1821831841851861871881891907 行未改动12 行未改动code:```cpp#include <bits/stdc++.h>using namespace std;#define int long long#define fir first#define sec second#define mkp make_pair#define pb push_back#define lep( i, l, r ) for ( int i = ( l ); i <= ( r ); ++ i )#define rep( i, r, l ) for ( int i = ( r ); i >= ( l ); -- i )typedef long long ll;typedef long double ld;typedef unsigned long long ull;typedef pair < int, int > pii;char _c; bool _f; template < class type > inline void read ( type &x ) {_f = 0, x = 0;while ( _c = getchar (), !isdigit ( _c ) ) if ( _c == '-' ) _f = 1;while ( isdigit ( _c ) ) x = x * 10 + _c - '0', _c = getchar (); if ( _f ) { x = -x; }}template < class type > inline void chkmin ( type &x, type y ) { x = ( x <= y ? x : y ); }template < class type > inline void chkmax ( type &x, type y ) { x = ( x >= y ? x : y ); }const int N = 1e3 + 5;139 行未改动全部展开p = mul ( p, base );dfs3 ( 0 );cout << ans;}signed main () {#ifdef judgefreopen ( "Code.in", "r", stdin );freopen ( "Code.out", "w", stdout );7 行未改动