| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 61620 | 王一涵(吃土豆长大的马铃薯) | 小明三年身高 | C++ | Accepted | 0 MS | 240 KB | 340 | 2025-03-06 16:52:31 |
#include<bits/stdc++.h> using namespace std; int main() { int heights[3]; int year; for(int i=0;i<3;i++){ cin>>heights[i]; } cin>>year; int index=year-2000; cout<<heights[index]<<endl; if(year==2000){ cout<<"0"<<endl; }else{ int growth=heights[index]-heights[index-1]; cout<<growth<<endl; } return 0; }