QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#49588#2283. Decelerating JumpasdasdasfasdfasdfsdafWA 3ms3664kbC++111.1kb2022-09-22 07:33:462022-09-22 07:33:49

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-22 07:33:49]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3664kb
  • [2022-09-22 07:33:46]
  • 提交

answer

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cstring>
#include <functional>
#include <algorithm>
#include <bitset>
#include <numeric>

#define sk(i, x) for(uint64_t i = 0; i < x; i++) 
#define skc(i, start, x) for(uint64_t i = start; i < x; i++) 

#define chin(x) char x; std::cin >> x;
#define slin(x) int64_t x; std::cin >> x
#define lin(x) uint64_t x; std::cin >> x
#define qsort(x) std::sort(x.begin(), x.end())
#define qmaxv(x) *std::max_element(x.begin(), x.end());
#define vsum(x) std::accumulate( x.begin(), x.end(), 0 )

typedef std::vector<int64_t> slv;
typedef std::vector<uint64_t> uslv;
typedef std::vector<int32_t> siv;
typedef std::vector<uint32_t> uiv;
typedef std::vector<bool> bv;




int main()
{
	lin( n );
	slv squares( n );
	sk( i, n )
	{
		slin( a );
		squares[i] = a;
	}
	int64_t highest_score = 0;
	skc( start_pos, 1, n )
	{
		int64_t score = squares[0];
		skc( i, start_pos, n )
		{
			score += squares[i];
		}
		if( score > highest_score ) {
			highest_score = score;
		}
	}
	std::cout << highest_score << "\n";
	return 0;

}

詳細信息

Test #1:

score: 100
Accepted
time: 3ms
memory: 3620kb

input:

1000
1 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

2

result:

ok single line: '2'

Test #2:

score: 0
Accepted
time: 3ms
memory: 3524kb

input:

1000
1 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

3

result:

ok single line: '3'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3524kb

input:

1000
1 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

7

result:

ok single line: '7'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3632kb

input:

1000
1 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

12

result:

ok single line: '12'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3588kb

input:

1000
1 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 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 0 0 0 0 0 0 0 0 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 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...

output:

27

result:

ok single line: '27'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3464kb

input:

1000
1 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #7:

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

input:

2
0 0

output:

0

result:

ok single line: '0'

Test #8:

score: -100
Wrong Answer
time: 2ms
memory: 3524kb

input:

2
-1 -9

output:

0

result:

wrong answer 1st lines differ - expected: '-10', found: '0'