Submission ID Problem Status Score Time Memory Code / Answer files User Submit time
#17928 #3. 子段和 Partition sum Accepted 100 963 ms 372 K C++ / 247 B HKSCF2023-074 2023-07-15 14:23:39
Show orginal code
#include <iostream>
using namespace std;

long long test, n, sum, x;

int main() {
    cin >> test;
    while (test--) {
        cin >> n;
        cin >> sum;
        for (int i = 2; i <= n; i++) {
            cin >> x;
            sum &= x;
        }
        cout << sum << endl;
    }
}
Subtask #1
Accepted
Score: 20
Test case #1
Accepted
Score: 100
Time: 8 ms
Memory: 248 KiB

Input file

1
100
253 255 238 237 239 254 253 236 255 255 237 254 236 255 255 255 254 254 237 254 236 255 254 
<310 bytes omitted>

Output file

236

Your output

236

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 10 ms
Memory: 372 KiB

Input file

1
100
251 255 255 251 247 255 247 255 255 243 243 251 255 247 251 247 247 243 243 243 251 255 243 
<310 bytes omitted>

Output file

243

Your output

243

System message

Exited with return code 0
Subtask #2
Accepted
Score: 40
Test case #1
Accepted
Score: 100
Time: 8 ms
Memory: 248 KiB

Input file

1
100
253 255 238 237 239 254 253 236 255 255 237 254 236 255 255 255 254 254 237 254 236 255 254 
<310 bytes omitted>

Output file

236

Your output

236

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 10 ms
Memory: 372 KiB

Input file

1
100
251 255 255 251 247 255 247 255 255 243 243 251 255 247 251 247 247 243 243 243 251 255 243 
<310 bytes omitted>

Output file

243

Your output

243

System message

Exited with return code 0
Test case #3
Accepted
Score: 100
Time: 24 ms
Memory: 252 KiB

Input file

1
30000
8415 43998 10494 44287 10206 13311 28670 29951 24830 43007 10495 58590 9214 32734 15327 31
<178216 bytes omitted>

Output file

8414

Your output

8414

System message

Exited with return code 0
Test case #4
Accepted
Score: 100
Time: 24 ms
Memory: 368 KiB

Input file

1
30000
49151 42495 48635 42495 42971 42495 42463 59391 65019 42971 65023 58879 42495 58843 43003 
<179912 bytes omitted>

Output file

42459

Your output

42459

System message

Exited with return code 0
Test case #5
Accepted
Score: 100
Time: 23 ms
Memory: 248 KiB

Input file

1
30000
61370 40958 39871 60319 56282 65530 36826 39835 53179 40891 56251 64411 52191 44991 57243 
<179912 bytes omitted>

Output file

35738

Your output

35738

System message

Exited with return code 0
Test case #6
Accepted
Score: 100
Time: 21 ms
Memory: 252 KiB

Input file

1
30000
63351 25591 60903 25583 58351 57471 28131 63079 59883 32251 25595 57843 25843 28403 64495 
<179912 bytes omitted>

Output file

0

Your output

0

System message

Exited with return code 0
Subtask #3
Accepted
Score: 10
Test case #1
Accepted
Score: 100
Time: 70 ms
Memory: 368 KiB

Input file

2
1
0 
499999
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
<999918 bytes omitted>

Output file

0
0

Your output

0
0

System message

Exited with return code 0
Subtask #4
Accepted
Score: 30
Test case #1
Accepted
Score: 100
Time: 8 ms
Memory: 248 KiB

Input file

1
100
253 255 238 237 239 254 253 236 255 255 237 254 236 255 255 255 254 254 237 254 236 255 254 
<310 bytes omitted>

Output file

236

Your output

236

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 10 ms
Memory: 372 KiB

Input file

1
100
251 255 255 251 247 255 247 255 255 243 243 251 255 247 251 247 247 243 243 243 251 255 243 
<310 bytes omitted>

Output file

243

Your output

243

System message

Exited with return code 0
Test case #3
Accepted
Score: 100
Time: 24 ms
Memory: 252 KiB

Input file

1
30000
8415 43998 10494 44287 10206 13311 28670 29951 24830 43007 10495 58590 9214 32734 15327 31
<178216 bytes omitted>

Output file

8414

Your output

8414

System message

Exited with return code 0
Test case #4
Accepted
Score: 100
Time: 24 ms
Memory: 368 KiB

Input file

1
30000
49151 42495 48635 42495 42971 42495 42463 59391 65019 42971 65023 58879 42495 58843 43003 
<179912 bytes omitted>

Output file

42459

Your output

42459

System message

Exited with return code 0
Test case #5
Accepted
Score: 100
Time: 23 ms
Memory: 248 KiB

Input file

1
30000
61370 40958 39871 60319 56282 65530 36826 39835 53179 40891 56251 64411 52191 44991 57243 
<179912 bytes omitted>

Output file

35738

Your output

35738

System message

Exited with return code 0
Test case #6
Accepted
Score: 100
Time: 21 ms
Memory: 252 KiB

Input file

1
30000
63351 25591 60903 25583 58351 57471 28131 63079 59883 32251 25595 57843 25843 28403 64495 
<179912 bytes omitted>

Output file

0

Your output

0

System message

Exited with return code 0
Test case #7
Accepted
Score: 100
Time: 70 ms
Memory: 368 KiB

Input file

2
1
0 
499999
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
<999918 bytes omitted>

Output file

0
0

Your output

0
0

System message

Exited with return code 0
Test case #8
Accepted
Score: 100
Time: 195 ms
Memory: 244 KiB

Input file

100
2
1851709435 1331617791 
1
2147483648 
1
20030227 
2
2147483648 0 
2
2147483647 200304
<5493861 bytes omitted>

Output file

1314838523
2147483648
20030227
0
20030403
2214550
134382723
1224871648
203132
1084252292
8
<976 bytes omitted>

Your output

1314838523
2147483648
20030227
0
20030403
2214550
134382723
1224871648
203132
1084252292
84279424
587202576
67129621
34734116
26
<848 bytes omitted>

System message

Exited with return code 0
Test case #9
Accepted
Score: 100
Time: 201 ms
Memory: 368 KiB

Input file

100
2
1609924591 2113241087 
1
2147483648 
1
20030227 
2
2147483648 0 
2
2147483647 200304
<5403842 bytes omitted>

Output file

1576370159
2147483648
20030227
0
20030403
1891753984
76697670
135562272
2101442
9134592
47
<977 bytes omitted>

Your output

1576370159
2147483648
20030227
0
20030403
1891753984
76697670
135562272
2101442
9134592
4718594
16780946
162136832
297840138
336
<849 bytes omitted>

System message

Exited with return code 0
Test case #10
Accepted
Score: 100
Time: 189 ms
Memory: 356 KiB

Input file

2
1
20030403 
499999
1199168509 1329456111 395829215 1863573453 2012472301 655612879 1738144735 
<5280686 bytes omitted>

Output file

20030403
118604749

Your output

20030403
118604749

System message

Exited with return code 0