| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 131044 | 林嘉乐 | 单价最高的书 | C++ | Wrong Answer | 1 MS | 280 KB | 395 | 2025-09-20 17:18:40 |
#include<bits/stdc++.h> using namespace std; struct book{ int c; string b; int s; int z,d; void in(){ cin>>c>>b>>s>>z; } void out(){ cout<<c<<" "<<b<<" "<<s<<" "<<z<<" "<<d<<endl; } }a[101]; int main() { int n; cin>>n; book maxn={0," ",0,0,0}; for(int i=0;i<=n;i++){ a[i].in(); if(a[i].d>maxn.d){ maxn=a[i]; } } maxn.out(); return 0; }
------Input------
3 1 Cinderella 12 120 2 Hoodwinked 10 150 3 Thumbelina 15 120
------Answer-----
2 Hoodwinked 10 150 15
------Your output-----
0 0 0 0