hihoCoder太阁最新面经算法竞赛13 register

Ended

Participants:132

Verdict:Accepted
Score:100 / 100
Submitted:2016-11-01 12:55:57

Lang:G++

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
#include <algorithm>
using namespace std;
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define MAXM 10000
struct Stack {
    int val;
    int cnt;
    bool operator < (const Stack &s) const {
        return val > s.val;
    }   
} stacks[MAXM*2];
int scnt;
int a[MAXM], p[MAXM], s[MAXM];
int main() {
    int n, m; scanf("%d %d", &n, &m);
    for (int i=0; i<m; ++i) { scanf("%d", &a[i]); }
    for (int i=0; i<m; ++i) { scanf("%d", &p[i]); }
    for (int i=0; i<m; ++i) { scanf("%d", &s[i]); }
    scnt = 0;
    for (int i=0; i<m; ++i) {
        int sc = a[i] / s[i];
        if (sc > 0) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX