CSES - HIIT Open 2019 - Results
Submission details
Task:Bit Strings
Sender:Team Lewd
Submission time:2019-05-25 14:14:13 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.01 sdetails
#50.02 sdetails
#60.01 sdetails
#70.01 sdetails
#80.02 sdetails
#90.02 sdetails
#100.02 sdetails
#110.03 sdetails
#120.02 sdetails
#130.03 sdetails
#140.02 sdetails
#150.03 sdetails
#160.03 sdetails
#170.03 sdetails
#180.02 sdetails

Code

#include <iostream>
using namespace std;
int main(){
	int n;
	int k;
	cin>>n;
	cin>>k;
	int ratk=n;
	for(int i=0; i<n-k; i++){
		ratk*=2;
		ratk= ratk%1000000007;
	}
	cout<<ratk;
}

Test details

Test 1

Verdict: ACCEPTED

input
1 1

correct output
1

user output
1

Test 2

Verdict:

input
2 1

correct output
1

user output
4

Test 3

Verdict:

input
2 2

correct output
3

user output
2

Test 4

Verdict:

input
3 1

correct output
1

user output
12

Test 5

Verdict:

input
3 2

correct output
5

user output
6

Test 6

Verdict:

input
3 3

correct output
7

user output
3

Test 7

Verdict:

input
4 1

correct output
1

user output
32

Test 8

Verdict:

input
4 2

correct output
8

user output
16

Test 9

Verdict:

input
4 3

correct output
13

user output
8

Test 10

Verdict:

input
4 4

correct output
15

user output
4

Test 11

Verdict:

input
654321 123456

correct output
796245691

user output
636972572

Test 12

Verdict:

input
1000000 1

correct output
1

user output
28677353

Test 13

Verdict:

input
1000000 10

correct output
256933600

user output
220759137

Test 14

Verdict:

input
1000000 100

correct output
142013415

user output
253350900

Test 15

Verdict:

input
1000000 1000

correct output
899626120

user output
503058060

Test 16

Verdict:

input
1000000 10000

correct output
374265948

user output
102263925

Test 17

Verdict:

input
1000000 100000

correct output
388134512

user output
152539633

Test 18

Verdict:

input
1000000 1000000

correct output
235042058

user output
1000000