| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62008 | 头像本人 | 水下探测器 | C++ | Wrong Answer | 1 MS | 264 KB | 272 | 2023-12-16 16:46:45 |
# include<iostream> using namespace std; int main(){ int b,h,n,s,i=0; char a[100]; cin>>h>>s; cin>>a[100]; for(i=0;i<='\0';i++){ if(s>0 and a[i]=='u'){ s--; } if(s<h and a[i]=='d'){ s++; } }cout<<s; return 0; }
------Input------
100 50 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
------Answer-----
100
------Your output-----
50