版本比较
题解:CF2223C Zhily and Signpost
正文
增加 2 行删除 2 行
31 行未改动32333435363738394011 行未改动52535455565758596032 行未改动31 行未改动int x = 0; char ch = getchar();while( ch < '0' || ch > '9' ) ch = getchar();while( ch >= '0' && ch <= '9' ) x = x * 10 + ch - 48,ch = getchar();return x;}int gcd( int a , int b ){ return b ? gcd( b , a % b ) : a; }void init( int x , int lc ){11 行未改动}}int get_ans( int x , int now ){if( !E[x].size() ) return x;if( to[x] != x ) return get_ans( to[x] , now + dep[to[x]] - dep[x] );int nxt = E[x][now % deg[x]];if( Lcm[x] == Lim + 1 || ( Lcm[nxt] <= Lim && Lcm[nxt] == Lcm[x] ) ){int res = get_ans( nxt , now + l[nxt] );32 行未改动31 行未改动32333435363738394011 行未改动52535455565758596032 行未改动31 行未改动int x = 0; char ch = getchar();while( ch < '0' || ch > '9' ) ch = getchar();while( ch >= '0' && ch <= '9' ) x = x * 10 + ch - 48,ch = getchar();return x;}int gcd( int a , int b ){ return b ? gcd( b , a % b ) : a; }void init( int x , int lc ){11 行未改动}}int get_ans( int x , int now ){if( !E[x].size() ) return x;if( to[x] != x ) return get_ans( to[x] , now + dep[to[x]] - dep[x] );int nxt = E[x][now % deg[x]];if( Lcm[x] == Lim + 1 || ( Lcm[nxt] <= Lim && Lcm[nxt] == Lcm[x] ) ){int res = get_ans( nxt , now + l[nxt] );32 行未改动