Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
27604 唐心 比较大小 C++ Accepted 1 MS 728 KB 280 2022-06-07 11:15:36

Tests(1/1):


Code:

#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int *p1,*p2,*t = new int; int a,b; p1 = &a; p2 = &b; cin>>a>>b; if(*p1<*p2) { *t = *p1; *p1 = *p2; *p2 = *t; } cout<<*p1<<" "<<*p2<<endl; return 0; }