记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:5:5: warning: unused variable 'a' [-Wunused-variable]
    5 | int a, b, c;
      |     ^
foo.cc:5:8: warning: unused variable 'b' [-Wunused-variable]
    5 | int a, b, c;
      |        ^
foo.cc:5:11: warning: unused variable 'c' [-Wunused-variable]
    5 | int a, b, c;
      |           ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 384.0 KiB
#2 Accepted 2ms 384.0 KiB
#3 Accepted 2ms 380.0 KiB
#4 Accepted 2ms 384.0 KiB
#5 Accepted 2ms 384.0 KiB
#6 Accepted 2ms 384.0 KiB
#7 Accepted 2ms 384.0 KiB
#8 Accepted 3ms 384.0 KiB
#9 Accepted 2ms 384.0 KiB
#10 Accepted 2ms 384.0 KiB

代码

#include<iostream>
using namespace std;
int main()
{
int a, b, c;
int x[3];
for (int i = 0; i < 3; i++)
{
cin >> x[i];
}
int temp;
for(int i=0;i<3;i++)
for (int j = i+1; j < 3; j++)
{
if (x[i] > x[j])
{
temp = x[i];
x[i] = x[j];
x[j] = temp;
}
}
cout << x[1];
return 0;
}

信息

递交者
类型
递交
题目
P1014 偷拍硕哥5
语言
C++
递交时间
2021-12-30 16:02:03
评测时间
2021-12-30 16:02:03
评测机
分数
100
总耗时
24ms
峰值内存
384.0 KiB