в функции main, почему то выводит мусор
%32[^,]
может записать до 33 байт (32 символа из файла + 0), что не влезет в такое поле: char title[32];
. Если файл в кодировке utf-8, то байтов в полях может быть больше чем символов. if primary>max_value:
max_key=primary
max_slov=key
if primary > max_value:
max_key = primary
max_slov = key
max_value = primary
Так же не могу реализовать условие "Если таких слов несколько, вывести лексикографически первое (можно использовать оператор < для строк)." Просьба дать разъяснение.
FAQ
Can I use celery? -- at the moment the answer is no. We're working on it.
Can I just use threads? -- we don't support threads in web apps, no
<Window.Resources>
<!--шаблон кнопки-->
<ControlTemplate x:Key="buttonTemplate1" TargetType="{x:Type Button}">
<Border Name="border" BorderBrush="Black" BorderThickness="1" CornerRadius="0" Background="Red" TextBlock.Foreground="Black">
<Grid>
<Rectangle Name="focusCue" Visibility="Hidden" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" SnapsToDevicePixels="True"></Rectangle>
<ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="Center" RecognizesAccessKey="True"></ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="Background.Color" To="Purple" >
</ColorAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="Background.Color" >
</ColorAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="IndianRed"></Setter>
<Setter TargetName="border" Property="BorderBrush" Value="DarkKhaki"></Setter>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter TargetName="focusCue" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="border" Property="TextBlock.Foreground" Value="Gray"></Setter>
<Setter TargetName="border" Property="Background" Value="MistyRose"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="newButtonStyle" TargetType="Button">
<Setter Property="Control.Template" Value="{StaticResource buttonTemplate1}"></Setter>
</Style>
</Window.Resources>
<StackPanel>
<Button Height="30" Width="100" Margin="10" Style="{StaticResource newButtonStyle}">
</Button>
</StackPanel>
cython -3 script.py