QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#231485#7055. A Hard Problemucup-team1001#AC ✓7ms3696kbC++20696b2023-10-29 13:01:472023-10-29 13:01:47

Judging History

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

  • [2023-10-29 13:01:47]
  • 评测
  • 测评结果:AC
  • 用时:7ms
  • 内存:3696kb
  • [2023-10-29 13:01:47]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);


using ll = long long;
#define int ll
#define endl "\n"
#define no cout << "NO" << endl
#define yes cout << "YES" << endl
#define pii pair<int,int>
#define ary(i) array<ll,(i)>
#define all(x) x.begin(),x.end()
const int maxn = 2e5 + 7;
const int inf = numeric_limits<int>::max();
const int inf2 = 0x3f3f3f3f3f3f3f3;
const int inff = numeric_limits<int>::min();
const int mod = 1e9 + 7;


void solve() {
    int n;
    cin>>n;
    cout<<(n+3)/2<<endl;
}

#undef int


int main() {
    IOS
    int t;
    cin >> t;
    while (t--) {
        solve();
    }

}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
2
3
4
5

output:

2
3
3
4

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 7ms
memory: 3648kb

input:

100000
6
18
54
162
486
1458
4374
13122
39366
118098
354294
1062882
3188646
9565938
28697814
86093442
258280326
774840978
324522916
973568748
920706226
762118660
286355962
859067886
577203640
731610911
194832715
584498145
753494426
260483260
781449780
344349322
33047957
99143871
297431613
892294839
6...

output:

4
10
28
82
244
730
2188
6562
19684
59050
177148
531442
1594324
4782970
14348908
43046722
129140164
387420490
162261459
486784375
460353114
381059331
143177982
429533944
288601821
365805457
97416359
292249074
376747214
130241631
390724891
172174662
16523980
49571937
148715808
446147421
338442251
1532...

result:

ok 100000 lines