delete pics to save space

This commit is contained in:
2023-08-03 09:22:52 +08:00
commit de60cd6ed4
1334 changed files with 66221 additions and 0 deletions

31
3.34895.cpp Normal file
View File

@ -0,0 +1,31 @@
#include<cstdio>
#include<cstring>
const int maxn=1e7+5;
char s[maxn];
int n;
int getmin(char *s)
{
int i=0,j=1,k=0,t;
while(i<n&&j<n&&k<n)
{
t=s[(i+k)%n]-s[(j+k)%n];
if(!t) k++;
else
{
if(t>0) i+=k+1;
else j+=k+1;
if(i==j) j++;
k=0;
}
}
return (i<j?i:j)%n;
}
int main()
{
#ifdef local
freopen("pro.in","r",stdin);
#endif
scanf("%s",s); n=strlen(s);
printf("%d\n",getmin(s));
return 0;
}