Accepted

/in/foo.cc: In function 'std::__cxx11::string who_is_win(std::__cxx11::string, std::__cxx11::string)':
/in/foo.cc:7:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a[0]=='R'&&b[0]=='S' || a[0]=='P'&&b[0]=='R' || a[0]=='S'&&b[0]=='P')
               
/in/foo.cc:7:62: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a[0]=='R'&&b[0]=='S' || a[0]=='P'&&b[0]=='R' || a[0]=='S'&&b[0]=='P')
                                                               
/in/foo.cc:9:19: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  else if(a[0]=='S'&&b[0]=='R' || a[0]=='R'&&b[0]=='P' || a[0]=='P'&&b[0]=='S')
                    
/in/foo.cc:9:67: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  else if(a[0]=='S'&&b[0]=='R' || a[0]=='R'&&b[0]=='P' || a[0]=='P'&&b[0]=='S')
                                                                    
/in/foo.cc:11:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   else if(a[0]=='R'&&b[0]=='R' || a[0]=='S'&&b[0]=='S' || a[0]=='P'&&b[0]=='P')
                     
/in/foo.cc:11:68: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   else if(a[0]=='R'&&b[0]=='R' || a[0]=='S'&&b[0]=='S' || a[0]=='P'&&b[0]=='P')
                                                                     
/in/foo.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# 状态 耗时 内存占用
#1 Accepted 1ms 360.0 KiB
#2 Accepted 1ms 340.0 KiB
#3 Accepted 1ms 336.0 KiB
#4 Accepted 1ms 360.0 KiB
#5 Accepted 1ms 336.0 KiB

信息

递交者
类型
递交
题目
P1987 1.7.4石头剪子布
比赛
春季班中级5.25
语言
C++
递交时间
2024-05-27 20:01:49
评测时间
2024-05-27 20:01:49
评测机
分数
100
总耗时
8ms
峰值内存
360.0 KiB