Дамп всех задач
This commit is contained in:
63
olymp2016/1/Project1.lpi
Normal file
63
olymp2016/1/Project1.lpi
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="Project1"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="Project1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="Project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
37
olymp2016/1/Project1.pas
Normal file
37
olymp2016/1/Project1.pas
Normal file
@@ -0,0 +1,37 @@
|
||||
program Project1;
|
||||
var
|
||||
f, f1: text;
|
||||
N, sum, sum1: integer;
|
||||
begin
|
||||
assign (f, 'zadanie1.txt');
|
||||
reset (f);
|
||||
read (f, N);
|
||||
close (f);
|
||||
writeln(N);
|
||||
sum:=sum+N div 100000;
|
||||
N:=N mod 100000;
|
||||
sum:=sum+N div 10000;
|
||||
N:=N mod 10000;
|
||||
sum:=sum+N div 1000;
|
||||
N:=N mod 1000;
|
||||
sum1:=sum1+N div 100;
|
||||
N:=N mod 100;
|
||||
sum1:=sum1+N div 10;
|
||||
N:=N mod 10;
|
||||
sum1:=sum1+N div 1;
|
||||
N:=N mod 1;
|
||||
assign (f, 'rezultat1.txt');
|
||||
rewrite (f);
|
||||
|
||||
if sum = sum1 then begin
|
||||
write (f, 'schastlyviy');
|
||||
writeln ('schastlyviy');
|
||||
end
|
||||
else begin
|
||||
write (f, 'neschastliviy');
|
||||
writeln ('neschastliviy');
|
||||
end;
|
||||
end.
|
||||
close (f);
|
||||
end.
|
||||
|
||||
0
olymp2016/1/rezultat1.txt
Normal file
0
olymp2016/1/rezultat1.txt
Normal file
1
olymp2016/1/zadanie1.txt
Normal file
1
olymp2016/1/zadanie1.txt
Normal file
@@ -0,0 +1 @@
|
||||
189347
|
||||
BIN
olymp2016/2/NEWTEXT.txt
Normal file
BIN
olymp2016/2/NEWTEXT.txt
Normal file
Binary file not shown.
1
olymp2016/2/TEXT.txt
Normal file
1
olymp2016/2/TEXT.txt
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>
|
||||
39
olymp2016/2/polindrom.cpp
Normal file
39
olymp2016/2/polindrom.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <iostream>
|
||||
//#include <graphics.h>
|
||||
//#include <conio.h>
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
ifstream f; f.open("TEXT.txt");
|
||||
ofstream d; d.open("NEWTEXT.txt");
|
||||
char s1[80], s2[80]; int i, j, N, len, k=0;
|
||||
f>>N;
|
||||
for (j=0; j<=N; j++) {
|
||||
k=0;
|
||||
f.getline(s1, sizeof(s1));
|
||||
cout <<s1<<" - ";
|
||||
d<<s1<<" - ";
|
||||
//main code here:
|
||||
len=strlen(s1);
|
||||
for (i=len-1; i>=0; i--) {
|
||||
s2[k]=s1[i]; k++;
|
||||
}
|
||||
s2[k]='\0';
|
||||
if (strcmp(s2,s1)==0) {
|
||||
cout<<"Palindrom!"<<endl;
|
||||
d<<"Palindrom!"<<endl;
|
||||
} else {
|
||||
cout<<"Ne palindrom!"<<endl;
|
||||
d<<"Ne palindrom!"<<endl;
|
||||
}
|
||||
//end of main code
|
||||
}
|
||||
d<<'\0';
|
||||
f.close(); d.close();
|
||||
return 0;
|
||||
}
|
||||
BIN
olymp2016/3/project1.lpi
Normal file
BIN
olymp2016/3/project1.lpi
Normal file
Binary file not shown.
27
olymp2016/3/project1.lpr
Normal file
27
olymp2016/3/project1.lpr
Normal file
@@ -0,0 +1,27 @@
|
||||
program project1;
|
||||
var a:string;
|
||||
i:integer;
|
||||
b:array[1..50] of integer;
|
||||
s:integer;
|
||||
begin
|
||||
writeln('Число в Римской СИ');
|
||||
readln(a);
|
||||
for i:=1 to length(a) do
|
||||
begin
|
||||
if a[i]='I'then b[i]:=1;
|
||||
if a[i]='V'then b[i]:=5;
|
||||
if a[i]='X'then b[i]:=10;
|
||||
if a[i]='L'then b[i]:=50;
|
||||
if a[i]='C'then b[i]:=100;
|
||||
if a[i]='D'then b[i]:=500;
|
||||
if a[i]='M'then b[i]:=1000;
|
||||
end;
|
||||
s:=0;
|
||||
for i:=1 to length(a) do
|
||||
begin
|
||||
s:=s+b[i];
|
||||
if(i>1)and(b[i-1]<b[i]) then s:=s-2*b[i-1];
|
||||
end;
|
||||
write(s);
|
||||
end.
|
||||
|
||||
63
olymp2016/4/project1.lpi
Normal file
63
olymp2016/4/project1.lpi
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
10
olymp2016/4/project1.lpr
Normal file
10
olymp2016/4/project1.lpr
Normal file
@@ -0,0 +1,10 @@
|
||||
program project1;
|
||||
var
|
||||
k,l,m,n: integer;
|
||||
begin
|
||||
writeln('k,l,m,n');
|
||||
readln(k,l,m,n);
|
||||
if (k+l+m+n) mod 2=0 then writeln('Одинаковы')
|
||||
else writeln('Разные');
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user