/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:45:24: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[10]' [-Wformat=]
  scanf("%s%s",&k+1,&s+1);
                        ^
/in/foo.cc:45:24: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'char (*)[10]' [-Wformat=]
/in/foo.cc:14:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define REP(i,n) for(int i=1;i<=n;i++)
                                
/in/foo.cc:46:6:
  REP(i,strlen(s+1)) ans[i]=(change(s[i])+change(k[i%strlen(k)+1])+26)%26+s[i]>='A'&&s[i]<='Z' ? 'A':'a';
      ~~~~~~~~~~~~~             
/in/foo.cc:46:2: note: in expansion of macro 'REP'
  REP(i,strlen(s+1)) ans[i]=(change(s[i])+change(k[i%strlen(k)+1])+26)%26+s[i]>='A'&&s[i]<='Z' ? 'A':'a';
  ^~~
# 状态 耗时 内存占用
#1 Runtime Error 2ms 384.0 KiB

信息

递交者
类型
自测
题目
P1778 vigenere密码
语言
C++
递交时间
2018-02-05 21:22:28
评测时间
2018-02-05 21:22:28
评测机
分数
0
总耗时
2ms
峰值内存
384.0 KiB