高一下二掉考试
“掉”是故意的
只能说, 菜是原罪,18分过两个样例可能就是实力,还需要在历练,不管是心态还是技巧
不过还是有些需要注意的,在改题的时候收获的
T3少打了4个字母\(else\)导致我调了5节课,顺便练了一波对拍,其实也不是很亏,学了对拍长了教训
现在来看其实除了T2的投射技巧都是板子题,投射技巧会体现在线性dp博客中
顺便把对拍板子搞过来,防止丢失
\(Upd6.4:\)更新了对拍板子
#include <cstdio>
#include <cstring>
#include <algorithm>
#define R register int
#define printf Ruusupuu = printf
#define int long
using namespace std ;
typedef long double D ;
typedef long long L ;
typedef unsigned long long G ;
const int N = 1e5 + 10 ;
const int M = 131 ;
int Ruusupuu , n ;
inline int read(){
int w = 0 ; bool fg = 0 ; char ch = getchar() ;
while( ch < '0' || ch > '9' ) fg |= ( ch == '-' ) , ch = getchar() ;
while( ch >= '0' && ch <= '9' ) w = ( w << 1 ) + ( w << 3 ) + ( ch - '0' ) , ch = getchar() ;
return fg ? -w : w ;
}
void sc(){
system( "g++ a.cpp -o a && g++ std.cpp -o std && g++ rand.cpp -o rand" ) ;
}
void work(){
G cnt = 0 ;
while( 1 ){
printf( "%llu " , cnt ++ ) ;
system( "./rand > test.in" ) ;
system( "./a < test.in > my.out && ./std < test.in > std.out" ) ;
if( system( "diff my.out std.out" ) ) { printf( "WA\n" ) ; break ; }
else printf( "AC\n" ) ;
}
}
signed main(){
sc() ;
work() ;
return 0 ;
}
随机数据函数
#include <bits/stdc++.h>
#define R register int
using namespace std ;
typedef long long L ;
const int N = 10 ;
inline int read(){
int w = 0 ; bool fg = 0 ; char ch = getchar() ;
while( ch < '0' || ch > '9' ) fg |= ( ch == '-' ) , ch = getchar() ;
while( ch >= '0' && ch <= '9' ) w = ( w << 1 ) + ( w << 3 ) + ( ch - '0' ) , ch = getchar() ;
return fg ? -w : w ;
}
int random( int n ){
int h = ( long long ) rand() * rand() % n ;
while( h <= 0 )
h = random( n ) ;
return h ;
}
int di( int n , int x ){
int d = random( n ) ;
while( x + d > n || d <= 0 )
d = random( n ) ;
return d ;
}
void work(){
freopen( "rand.txt" , "w" , stdout ) ;
srand( (unsigned) time(0) ) ;
int n = 10 , m = 5 ;
printf( "%d %d\n" , n , m ) ;
for( R i = 1 ; i <= m ; i ++ ){
int k = ( random( 10000 ) % 3 == 1 ) ? 2 : 1 ;
printf( "%d " , k ) ;
if( k == 1 ) { int x = random( n ) ; printf( "%d\n" , x ) ; }
else { int x = random( n ) , d = di( n , x ) ; printf( "%d %d\n" , x , d ) ; }
}
}
signed main(){
// sc() ;
work() ;
return 0 ;
}
$The \ light \ has \ betrayed \ me$

菜是原罪
浙公网安备 33010602011771号