0
点赞
收藏
分享

微信扫一扫

第54期:Codeforces-Round #775 (Div. 2, based on Moscow Open Olympiad in Informatics)

Java旺 2022-03-11 阅读 68
算法

solved: B

​​​​​​A. Game

tags: implementation

solution: 比赛时没有认真读题,理解成了可以无限跨水跳,但是实际题意是只能不超过跳一次。

code: 

#include<bits/stdc++.h>
using namespace std;
void solve(){
	int n,a[110];
	cin>>n;
	for(int i=1;i<=n;i++) cin>>a[i];
	int l=1,r=n;
	while(a[l
举报

相关推荐

0 条评论