Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2547 | 张宸瑜 | 校门外的树 | C++ | Wrong Answer | 0 MS | 264 KB | 331 | 2024-01-13 15:39:04 |
# include<iostream> # include<cstdio> # include<iomanip> using namespace std; int main(){ int L,M,a,b,c=0; cin>>L>>M; for(int i=1;i<=M;i++) { cin>>a>>b; if(a<b){ c=a; a=b; b=c; } L=L-(a-b); } cout<<L; return 0; }
------Input------
10000 10 123 134 890 1231 1321 3123 3333 4444 9999 10000 8888 9988 4555 4666 5000 6000 8007 8887 6777 8000
------Answer-----
2411
------Your output-----
2420