Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
谁帮我看看,为什么 RE?#include <stdio.h> #define MAX_ROW 1000 #define MAX_COLUMN 1000 int main(int argc, char * argv[]) { int case_num; int case_count; int seat[MAX_ROW][MAX_COLUMN]; if (EOF == scanf("%d", &case_num)) { return 1; } for (case_count = 0; case_count < case_num; ++case_count) { int i; int j; int row; int column; int r1; int s1; int r2; int s2; int query_count; int query_num; int score; scanf("%d %d", &row, &column); for (i = 0; i < row; ++i) { for (j = 0; j < column; ++j) { scanf("%d", &seat[i][j]); } } scanf("%d", &query_num); for (query_count = 0; query_count < query_num; ++query_count) { scanf("%d %d %d %d", &r1, &s1, &r2, &s2); score = 0; for (i = r1 - 1; i < r2; ++i) { for (j = s1 - 1; j < s2; ++j) { score += seat[i][j]; } } printf("Absolutni hodnota pohodlnosti je %d bodu.\n", score); } printf("\n"); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator