QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#251796#6761. Chuanpaihaze#AC ✓0ms3684kbC++201.1kb2023-11-15 09:07:212023-11-15 09:07:22

Judging History

你现在查看的是最新测评结果

  • [2023-11-15 09:07:22]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3684kb
  • [2023-11-15 09:07:21]
  • 提交

answer

/*
Author: haze
2023/11/15
09:02
*/

#include <bits/stdc++.h>

#define irep(i, l, r) for(int (i) = (l); (i) <= (r); ++(i))
#define drep(i, r, l) for(int (i) = (r); (i) >= (l); --(i))
#define ll long long
#define LL __int128
using namespace std;

inline ll read() {
    char ch = getchar();
    ll s = 0;
    bool w = 0;
    while (!isdigit(ch)) {
        if (ch == '-')w = 1;
        ch = getchar();
    }
    while (isdigit(ch))s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
    return w ? -s : s;
}

inline char rc() {
    char ch = getchar();
    while (1) {
        if (ch >= '!' && ch <= '~')return ch;
        ch = getchar();
    }
}

template<class T1, class T2>
T1 min(T1 AA, T2 BB) { return AA > BB ? BB : AA; }

template<class T1, class T2>
T1 max(T1 AA, T2 BB) { return AA < BB ? BB : AA; }

const int itinf = 1e9;
const ll llinf = 4e18;
const int mod = 1000000007;
const int N = 500009;

int main() {
    int T = read();
    while(T --){
        int n = read(), ans = 0;
        irep(i, 1, 6)irep(j, i, 6)if(i + j == n) ++ ans;
        cout << ans << '\n';
    }

    return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3676kb

input:

4
4
5
8
100

output:

2
2
3
0

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

100
39
77
67
25
81
26
50
11
73
95
86
16
90
33
14
79
12
100
68
64
60
27
41
15
34
24
3
61
83
47
57
65
99
43
40
21
94
72
82
85
23
71
76
32
10
17
30
18
44
59
35
89
6
63
7
69
62
70
4
29
92
87
31
48
36
28
45
97
93
98
56
38
58
80
8
1
74
91
53
55
54
51
96
5
42
52
9
22
78
88
75
13
66
2
37
20
49
19
84
46

output:

0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
0
0
0
0
2
0
0
2
0
0
0
0
0
0
1
0
0
0
0
0
0

result:

ok 100 lines