编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#21169 #2044. 芙宁娜的小蛋糕 Accepted 100 2704 ms 428 K C++ 17 / 1.3 K Non_User3777 2024-12-14 15:11:20
显示原始代码
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long LL;
typedef pair<LL, LL> PII;
const int N = 4e5 + 10, M = 2e6;
const int mod = 998244353;
const LL P = 1e9 + 7;
const LL INF = 1e18;
LL h[N], e[M], ne[M], w[M], idx;
int T = 1;
LL n;

LL qmi(LL a, LL k) {
    LL res = 1;

    while (k) {
        if (k & 1)
            res = res * a % mod;

        a = a * a % mod;
        k >>= 1;
    }

    return res;
}

LL find(LL k) {
    LL res = 0;
    LL t = n;
    while (t < k) t = t * 2, res++;

    return res - 1;
}

/*void solve(){
    cin>>n;
    vector<int> a(n+1);

    for(int i=1;i<=n;i++) cin>>a[i];

    int q;
    cin>>q;
    while(q--){
        LL k;
        cin>>k;
        //cout<<k<<endl;
        bool sg=0;

        while(k>n){
            LL t=find(k);
            //cout<<t<<endl;
            sg^=1;
            k%=n*qmi(2,t);
            if(k==0) k=n*qmi(2,t);
            //cout<<k<<endl;
        }

        char res=a[k];
        //cout<<res<<endl;

        if(sg){
            res=res+'a'-1;
        }
        else res+='0';


        cout<<res<<endl;
    }

}*/

void solve() {
    LL n;
    cin >> n;

    cout << n + 1 << " " << n * (n + 1) << " " << n << endl;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // int T=1;

    cin >> T;

    while (T--) solve();

    return 0;
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:4 ms
内存:328 KiB

输入文件(test1.in

15
49
2
58
26
70
27
89
53
92
74
66
8
46
38
12

用户输出

50 2450 49
3 6 2
59 3422 58
27 702 26
71 4970 70
28 756 27
90 8010 89
54 2862 53
93 8556 92
75 5550 74
67 4422 66
9 72 8
47 2162
<25 bytes omitted>

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:4 ms
内存:412 KiB

输入文件(test2.in

15
24
100
30
35
92
35
28
74
53
6
70
36
85
45
64

用户输出

25 600 24
101 10100 100
31 930 30
36 1260 35
93 8556 92
36 1260 35
29 812 28
75 5550 74
54 2862 53
7 42 6
71 4970 70
37 1332 36

<33 bytes omitted>

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:4 ms
内存:320 KiB

输入文件(test3.in

15
62
82
30
82
74
32
12
2
8
66
69
38
42
18
50

用户输出

63 3906 62
83 6806 82
31 930 30
83 6806 82
75 5550 74
33 1056 32
13 156 12
3 6 2
9 72 8
67 4422 66
70 4830 69
39 1482 38
43 1806
<25 bytes omitted>

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:4 ms
内存:324 KiB

输入文件(test4.in

15
18
100
8
78
91
97
64
22
64
80
47
30
32
23
66

用户输出

19 342 18
101 10100 100
9 72 8
79 6162 78
92 8372 91
98 9506 97
65 4160 64
23 506 22
65 4160 64
81 6480 80
48 2256 47
31 930 30

<32 bytes omitted>

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:3 ms
内存:416 KiB

输入文件(test5.in

15
42
98
87
72
14
2
86
82
39
61
61
101
7
24
50

用户输出

43 1806 42
99 9702 98
88 7656 87
73 5256 72
15 210 14
3 6 2
87 7482 86
83 6806 82
40 1560 39
62 3782 61
62 3782 61
102 10302 101
<29 bytes omitted>

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:4 ms
内存:412 KiB

输入文件(test6.in

15
14
82
86
2
12
92
90
86
97
2
78
82
18
54
14

用户输出

15 210 14
83 6806 82
87 7482 86
3 6 2
13 156 12
93 8556 92
91 8190 90
87 7482 86
98 9506 97
3 6 2
79 6162 78
83 6806 82
19 342 1
<23 bytes omitted>

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:3 ms
内存:324 KiB

输入文件(test7.in

15
56
49
86
2
11
6
86
49
72
84
46
87
2
66
96

用户输出

57 3192 56
50 2450 49
87 7482 86
3 6 2
12 132 11
7 42 6
87 7482 86
50 2450 49
73 5256 72
85 7140 84
47 2162 46
88 7656 87
3 6 2

<22 bytes omitted>

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:4 ms
内存:324 KiB

输入文件(test8.in

15
94
98
80
77
101
3
44
2
46
82
40
24
15
86
98

用户输出

95 8930 94
99 9702 98
81 6480 80
78 6006 77
102 10302 101
4 12 3
45 1980 44
3 6 2
47 2162 46
83 6806 82
41 1640 40
25 600 24
16 
<29 bytes omitted>

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:4 ms
内存:328 KiB

输入文件(test9.in

15
4
32
80
22
18
70
62
90
34
77
100
6
40
24
81

用户输出

5 20 4
33 1056 32
81 6480 80
23 506 22
19 342 18
71 4970 70
63 3906 62
91 8190 90
35 1190 34
78 6006 77
101 10100 100
7 42 6
41 
<29 bytes omitted>

系统信息

Exited with return code 0
测试点 #10
Accepted
得分:100
用时:4 ms
内存:412 KiB

输入文件(test10.in

15
34
90
2
2
9
70
91
67
72
72
90
71
26
28
71

用户输出

35 1190 34
91 8190 90
3 6 2
3 6 2
10 90 9
71 4970 70
92 8372 91
68 4556 67
73 5256 72
73 5256 72
91 8190 90
72 5112 71
27 702 26
<22 bytes omitted>

系统信息

Exited with return code 0
测试点 #11
Accepted
得分:100
用时:258 ms
内存:324 KiB

输入文件(test11.in

100000
757149
167851002
301413358
336971126
659598370
160567227
391749389
4890853
35766292
<1062824 bytes omitted>

用户输出

757150 573275365350 757149
167851003 28173959040255006 167851002
301413359 90850012682249522 301413358
336971127 113549540094679
<3707688 bytes omitted>

系统信息

Exited with return code 0
测试点 #12
Accepted
得分:100
用时:256 ms
内存:400 KiB

输入文件(test12.in

100000
388526385
167178296
5797002
179597342
343191872
258689190
42351134
147820952
1275653
<1062696 bytes omitted>

用户输出

388526386 150952752229694610 388526385
167178297 27948582820641912 167178296
5797003 33605237985006 5797002
179597343 3225520543
<3707333 bytes omitted>

系统信息

Exited with return code 0
测试点 #13
Accepted
得分:100
用时:289 ms
内存:344 KiB

输入文件(test13.in

100000
115913290
201095
57736252
369868052
695962364
64768898
96057388
645998786
256252754
<1062452 bytes omitted>

用户输出

115913291 13435890914537390 115913290
201096 40439400120 201095
57736253 3333474852743756 57736252
369868053 136802376260142756 
<3706262 bytes omitted>

系统信息

Exited with return code 0
测试点 #14
Accepted
得分:100
用时:262 ms
内存:328 KiB

输入文件(test14.in

100000
206495012
695164733
117412535
213191456
103236564
249658654
173057476
144950642
3921
<1062488 bytes omitted>

用户输出

206495013 42640190187375156 206495012
695164734 483254006702126022 695164733
117412536 13785703492538760 117412535
213191457 454
<3706451 bytes omitted>

系统信息

Exited with return code 0
测试点 #15
Accepted
得分:100
用时:261 ms
内存:412 KiB

输入文件(test15.in

100000
76467998
636722920
322721819
627554380
618858935
22121156
437103970
47962090
3041548
<1062727 bytes omitted>

用户输出

76467999 5847354794596002 76467998
636722921 405416077490049320 636722920
322721820 104149372781390580 322721819
627554381 39382
<3707276 bytes omitted>

系统信息

Exited with return code 0
测试点 #16
Accepted
得分:100
用时:282 ms
内存:416 KiB

输入文件(test16.in

100000
230797514
251755385
86525558
98616322
52775434
147068837
525792176
15465352
11535660
<1062669 bytes omitted>

用户输出

230797515 53267492699377710 230797514
251755386 63380774128253610 251755385
86525559 7486672273736922 86525558
98616323 97251790
<3706936 bytes omitted>

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:262 ms
内存:372 KiB

输入文件(test17.in

100000
71493907
451327512
143831677
61901150
499136666
245588576
182742369
654776267
385968
<1062634 bytes omitted>

用户输出

71493908 5111378809618556 71493907
451327513 203696523539437656 451327512
143831678 20687551452464006 143831677
61901151 3831752
<3707237 bytes omitted>

系统信息

Exited with return code 0
测试点 #18
Accepted
得分:100
用时:269 ms
内存:428 KiB

输入文件(test18.in

100000
692857962
410435586
60993992
776048264
199867103
368330978
71255333
804599084
187734
<1062724 bytes omitted>

用户输出

692857963 480052156199651406 692857962
410435587 168457370665598982 410435586
60993993 3720267121090056 60993992
776048265 60225
<3707255 bytes omitted>

系统信息

Exited with return code 0
测试点 #19
Accepted
得分:100
用时:266 ms
内存:384 KiB

输入文件(test19.in

100000
72972744
129884942
133713810
50663369
278397277
8849570
142972418
69058257
248165402
<1062781 bytes omitted>

用户输出

72972745 5325021439862280 72972744
129884943 16870098288228306 129884942
133713811 17879383118429910 133713810
50663370 25667770
<3707488 bytes omitted>

系统信息

Exited with return code 0
测试点 #20
Accepted
得分:100
用时:261 ms
内存:396 KiB

输入文件(test20.in

100000
194646211
177969602
420998261
556762128
37261842
119761840
170055539
123864862
68103
<1062971 bytes omitted>

用户输出

194646212 37887147651302732 194646211
177969603 31673179414008006 177969602
420998262 177239536186022382 420998261
556762129 309
<3708454 bytes omitted>

系统信息

Exited with return code 0