@@ -264,6 +264,20 @@ impl std::fmt::Display for VerifyResult {
264
264
eca,
265
265
)
266
266
} else if !self . submit . compare_result . is_empty ( ) {
267
+ // Submit Successfully
268
+ // TODO: result shoule be all 1;
269
+ // Lines below are sucks...
270
+ let cache = super :: Cache :: new ( ) . expect ( "cache gen failed" ) ;
271
+ cache
272
+ . update_after_ac (
273
+ self . submit
274
+ . question_id
275
+ . parse ( )
276
+ . expect ( "submit succcessfully, parse question_id to i32 failed" ) ,
277
+ )
278
+ . expect ( "update ac to cache failed" ) ;
279
+
280
+ // prints
267
281
let ( mut rp, mut mp) = ( 0 , 0 ) ;
268
282
if let Some ( n) = & self . analyse . runtime_percentile {
269
283
if n. is_f64 ( ) {
@@ -280,8 +294,6 @@ impl std::fmt::Display for VerifyResult {
280
294
mp = n. as_i64 ( ) . unwrap_or ( 0 ) ;
281
295
}
282
296
}
283
-
284
- // Submit Successfully
285
297
write ! (
286
298
f,
287
299
"\n {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}.\n " ,
@@ -376,7 +388,7 @@ mod verify {
376
388
#[ derive( Debug , Default , Deserialize ) ]
377
389
pub struct Submit {
378
390
#[ serde( default ) ]
379
- question_id : String ,
391
+ pub question_id : String ,
380
392
#[ serde( default ) ]
381
393
pub last_testcase : String ,
382
394
#[ serde( default ) ]
0 commit comments