题号是1076
by 第一大砍刀 @ 2018-10-16 20:22:52
就不告诉你^^^^^;
(逃)
by 识破天机ad @ 2018-10-16 20:24:53
大哥
by 第一大砍刀 @ 2018-10-16 20:25:15
别闹
by 第一大砍刀 @ 2018-10-16 20:25:30
#include<iostream>
#include <cstdio>
using namespace std;
int n,m,ans;
int s;
int a[10001][101],b[10001][101];
void dfs(int x,int y)
{
int q;
if(x>n)
{
return ;
}
q=y;
int f=0;
ans+=b[x][y];
while(f<b[x][y])
{
f+=a[x][q];
if(f==b[x][y])
break;
q++;
if(q==m)
q=0;
}
dfs(x+1,q);
}
int main()
{
cin>>n>>m;
for(int i=1; i<=n; i++)
for(int j=0; j<m; j++)
{
cin>>a[i][j]>>b[i][j];
}
cin>>s;
dfs(1,s);
cout<<ans%20123<<"\n";
return 0;
}
by 第一大砍刀 @ 2018-10-16 20:25:43
这个是本蒟蒻写的代码
by 第一大砍刀 @ 2018-10-16 20:26:20
只会var
https://cdn.luogu.com.cn/upload/pic/38119.png
by 识破天机ad @ 2018-10-16 20:28:04
var是甚么鬼
by 第一大砍刀 @ 2018-10-16 20:32:18
@[第一大砍刀](/space/show?uid=116262) 是Pascal
by Billy●Herrington @ 2018-10-16 20:40:25
@[识破天机ad](/space/show?uid=120480) 大佬,不是Pascal吗
by AUGUST802 @ 2018-10-16 20:40:55