Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
141830 baim. 音乐会 C++ 编译错误 0 0 MS 0 KB 318 2024-04-06 11:31:34

Tests(0/0):


#include <bits/stdc++.h> using namespace std; int x,n,ans; stacks; int main() { cin>>n; while (n--) { cin>>x;int t=1; while (s.size() && x>=s.top()) { if (s.top()==x)t++; ans++;s.pop(); } if (s.size())ans++; while (t--)s.push(x); } cout<<ans; return 0; }


测评信息: