水题,主要是学习文件输入输出。
1 /* 2 ID: ijustwa1 3 LANG: C++ 4 TASK: ride 5 */ 6 #include<cstdio> 7 #include<cstring> 8 9 using namespace std; 10 11 const int base=16; 12 const int mod=47; 13 14 char s[10]; 15 char t[10]; 16 17 int main() 18 { 19 FILE *fin=fopen("ride.in","r"); 20 FILE *fout=fopen("ride.out","w"); 21 22 fscanf(fin,"%s",s); 23 fscanf(fin,"%s",t); 24 int sums=1; 25 int sumt=1; 26 for(int i=0;s[i]!='