[Offer收割]编程练习赛7 register

Ended

Participants:506

Verdict:Wrong Answer
Score:20 / 100
Submitted:2016-08-28 14:29:28

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.Arrays;
import java.util.Scanner;
class Cha{
    int u=0;
    int firstmaxh=0;
    int secondmaxh=0;
}
public class Main {
public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int width = sc.nextInt();
    int picnums = sc.nextInt();
    int matrix[][] =  new int[picnums][width];
    int avaliablewidth=width;
    int m=0;
    int n=0;
    int r=0;
    Cha cha[] = new Cha[picnums];
    for(int i=0;i<picnums;i++){
        cha[i]  = new Cha();
    }
    int firstmaxh=0;
    int secondmaxh=0;
    for(int i=0;i<picnums;i++){
        int w = sc.nextInt();
        int h = sc.nextInt();
        if(avaliablewidth==0){
            
            cha[r].u=firstmaxh-secondmaxh;
            cha[r].firstmaxh = firstmaxh;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX