Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
121512 梁乃元 封闭面积问题 C++ 解答错误 0 0 MS 252 KB 525 2024-01-21 21:24:08

Tests(0/10):


# include <bits/stdc++.h> using namespace std ; queue <int> ln ; int main ( ) { int sum = 0 ; for ( int i = 1 ; i <= 10 ; i ++ ) { while ( ! ln . empty ( ) ) { ln . pop ( ) ; } int cnt = 0 , cur = 0 ; for ( int j = 1 ; j <= 10 ; j ++ ) { int a ; cin >> a ; if ( a == 1 ) { cnt ++ ; } if ( cnt % 2 == 1 ) { cur = j + 1 ; } if ( cnt % 2 == 0 ) { sum += j - cur ; } ln . push ( a ) ; } } cout << sum << endl ; return 0 ; }


测评信息: