求助大佬,为什么0分

P1319 压缩技术

@[罗贤泽](/space/show?uid=75436) 你先直接构造出一个超长字符串,输出时再处理换行试试
by Sya_Resory @ 2019-01-28 15:56:09


#include<iostream> using namespace std; int a[210]; int n; int main() { cin>>n; int t=0; int s; int p=0; while(p<n*n) { t++; cin>>a[t]; p+=a[t]; } for(int i=1;i<=2*n;i++) { if(i%2==1) { for(int j=1;j<=a[i];j++) { if((t+j)%7==0)t-=7,cout<<"0"<<endl; else cout<<"0"; } } else { for(int j=1;j<=a[i];j++) { if((t+j)%7==0)t-=7,cout<<"1"<<endl; else cout<<"1"; } } t+=a[i]; } return 0; } //求助大佬,为什么为零分?
by In_blue @ 2019-05-17 12:21:41


|