Skip to content

Commit d8a3da5

Browse files
authored
dasd
1 parent 905588e commit d8a3da5

File tree

21 files changed

+824
-25
lines changed

21 files changed

+824
-25
lines changed

.vscode/settings.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,37 @@
4343
"thread": "cpp",
4444
"tuple": "cpp",
4545
"type_traits": "cpp",
46-
"typeindex": "cpp"
46+
"typeindex": "cpp",
47+
"any": "cpp",
48+
"bit": "cpp",
49+
"cctype": "cpp",
50+
"cfenv": "cpp",
51+
"charconv": "cpp",
52+
"cinttypes": "cpp",
53+
"clocale": "cpp",
54+
"codecvt": "cpp",
55+
"csetjmp": "cpp",
56+
"csignal": "cpp",
57+
"cstdarg": "cpp",
58+
"cstddef": "cpp",
59+
"cstdint": "cpp",
60+
"cstdio": "cpp",
61+
"cstdlib": "cpp",
62+
"cstring": "cpp",
63+
"ctime": "cpp",
64+
"cuchar": "cpp",
65+
"cwctype": "cpp",
66+
"map": "cpp",
67+
"set": "cpp",
68+
"algorithm": "cpp",
69+
"memory": "cpp",
70+
"memory_resource": "cpp",
71+
"numeric": "cpp",
72+
"optional": "cpp",
73+
"system_error": "cpp",
74+
"iomanip": "cpp",
75+
"typeinfo": "cpp",
76+
"variant": "cpp"
4777
},
4878
"competitive-programming-helper.firstTime": false,
4979
"compile-hero.disable-compile-files-on-did-save-code": true,

753a.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
5+
#define LL long long
6+
#define mod 1000000007
7+
#define all(v) v.begin(),v.end()
8+
#define pr(v) pair<v,v>
9+
#define pb push_back
10+
#define FOR(i, j, k) for (auto i=j ; i<k ; i++)
11+
#define ROF(i, j, k) for (auto i=j ; i>=k ; i--)
12+
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
13+
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false); debug("%s time : %.4fs", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
14+
15+
const long long INF = 1e18;
16+
const long long MAX = 2e5+10;
17+
18+
int main(){
19+
fastio;
20+
int t; cin>>t;
21+
while(t--){
22+
23+
}
24+
}

753b.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
5+
#define LL long long
6+
#define mod 1000000007
7+
#define all(v) v.begin(),v.end()
8+
#define pr(v) pair<v,v>
9+
#define pb push_back
10+
#define FOR(i, j, k) for (auto i=j ; i<k ; i++)
11+
#define ROF(i, j, k) for (auto i=j ; i>=k ; i--)
12+
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
13+
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false); debug("%s time : %.4fs", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
14+
15+
const long long INF = 1e18;
16+
const long long MAX = 2e5+10;
17+
18+
int main(){
19+
fastio;
20+
int t; cin>>t;
21+
while(t--){
22+
23+
}
24+
}

T

Whitespace-only changes.

a.out

736 Bytes
Binary file not shown.

adv.cpp

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
#define fastio \
5+
ios_base::sync_with_stdio(0); \
6+
cin.tie(0)
7+
#define LL long long
8+
#define mod 998244353
9+
#define FOR(i, j, k) for (int i = j; i < k; i++)
10+
#define ROF(i, j, k) for (int i = j; i >= k; i--)
11+
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
12+
#define time__(d) for (long blockTime = 0; (blockTime == 0 ? (blockTime = clock()) != 0 : false); debug("%s time : %.4fs", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
13+
const long long INF = 1e18;
14+
const long long MAX = 1e5 + 10;
15+
16+
LL ans = INT_MIN;
17+
bool isOp(char c)
18+
{
19+
return (c == '+' || c == '-' || c == '*' || c == '/');
20+
}
21+
22+
bool prio(char c)
23+
{
24+
if (c == '+' || c == '-')
25+
return 1;
26+
return 2;
27+
}
28+
29+
long long cal(LL a, LL b, char o)
30+
{
31+
if (o == '+')
32+
return a + b;
33+
if (o == '-')
34+
return a - b;
35+
if (o == '*')
36+
return a * b;
37+
return a / b;
38+
}
39+
40+
void eval(string s)
41+
{
42+
int n = s.size();
43+
if (isOp(s[0]) || isOp(s[n - 1]))
44+
return;
45+
for (int i = 0; i < n - 1; i++)
46+
if (isOp(s[i]) && isOp(s[i + 1]))
47+
return;
48+
vector<LL> v;
49+
string op;
50+
LL a = 0;
51+
for (int i = 0; i < n; i++)
52+
{
53+
if (isOp(s[i]))
54+
{
55+
v.push_back(a);
56+
a = 0;
57+
op += s[i];
58+
}
59+
else
60+
a = a * 10 + (s[i] - '0');
61+
}
62+
v.push_back(a);
63+
if (op.size() == 1)
64+
{
65+
ans = max(ans, cal(v[0], v[1], op[0]));
66+
}
67+
else
68+
{
69+
if (prio(op[0]) >= prio(op[1]))
70+
{
71+
LL temp = cal(v[0], v[1], op[0]);
72+
temp = cal(temp, v[2], op[1]);
73+
ans = max(ans, temp);
74+
}
75+
else
76+
{
77+
LL temp = cal(v[1], v[2], op[1]);
78+
temp = cal(v[0], temp, op[0]);
79+
ans = max(ans, temp);
80+
}
81+
}
82+
}
83+
LL cnt = 0;
84+
void permute(string s, string answer)
85+
{
86+
if (s.length() == 0)
87+
{ cout<<"answer"<<" ";
88+
cnt++;
89+
eval(answer);
90+
return;
91+
}
92+
for (int i = 0; i < s.length(); i++)
93+
{
94+
char ch = s[i];
95+
string left_substr = s.substr(0, i);
96+
string right_substr = s.substr(i + 1);
97+
string rest = left_substr + right_substr;
98+
permute(rest, answer + ch);
99+
}
100+
}
101+
102+
int main()
103+
{
104+
fastio;
105+
int t = 1;
106+
cin >> t;
107+
time__("dsad")
108+
{
109+
while (t--)
110+
{
111+
string s;
112+
cin >> s;
113+
// permute(s,"");
114+
sort(s.begin(), s.end());
115+
while (next_permutation(s.begin(), s.end()))
116+
{ cnt++;
117+
eval(s);
118+
}
119+
120+
cout << ans << " "<<cnt<<"\n";
121+
cnt=0;
122+
ans = INT_MIN;
123+
}
124+
}
125+
}

bne.cpp

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
#include <bits/stdc++.h>
3+
using namespace std;
4+
5+
6+
pair<int,int> printClosest(vector<vector<int>> ar1, vector<vector<int>> ar2, int m, int n, int x)
7+
{
8+
int diff = INT_MAX;
9+
int res_l=-1, res_r=-1;
10+
11+
int l = 0, r = n-1;
12+
while (l<m && r>=0)
13+
{
14+
if (abs(ar1[l][1] + ar2[r][1] - x) < diff)
15+
{
16+
res_l = l;
17+
res_r = r;
18+
diff = abs(ar1[l][1] + ar2[r][1] - x);
19+
}
20+
if (ar1[l][1] + ar2[r][1] > x)
21+
r--;
22+
else
23+
l++;
24+
}
25+
if(res_l==-1) return {-1,-1};
26+
27+
return {ar1[res_l][1],ar2[res_r][1]};
28+
}
29+
30+
bool cmp(vector<int>&a, vector<int>&b){
31+
return (a[1]==a[1] ? a[0]<b[0]: a[1]<b[1]);
32+
}
33+
34+
int main()
35+
{
36+
vector<vector<int>> ar1 = {{2,7},{3,14}};// {{1,3},{2,5},{3,7},{4,10}};
37+
vector<vector<int>> ar2 = {{2,10},{3,14}}; //{{1,2},{2,3},{3,4},{4,5}};
38+
vector<int>a1[10000];
39+
vector<int>a2[10000];
40+
sort(ar1.begin(),ar1.end(),cmp);
41+
sort(ar2.begin(),ar2.end(),cmp);
42+
map<int,int>m1,m2;
43+
int x = 16;
44+
int n = ar1.size();
45+
int m = ar2.size();
46+
for(int i=0;i<n;i++) a1[ar1[i][1]].push_back(ar1[i][0]),m1[ar1[i][1]]++;
47+
for(int i=0;i<m;i++) a2[ar2[i][1]].push_back(ar2[i][0]),m2[ar2[i][1]]++;
48+
auto pr = printClosest(ar1, ar2, n, m, x);
49+
50+
vector<pair<int,int>>res;
51+
int p = pr.first,q=pr.second;
52+
int tot = p+q;
53+
for(int i=0;i<n && tot<=x;i++){
54+
int s = ar1[i][1],e = tot-s;
55+
if(!m2[e] ) continue;
56+
for(int j=0;j<a1[s].size();j++){
57+
for(int k=0;k<a2[e].size();k++) res.push_back({a1[s][j],a2[e][k]});
58+
}
59+
}
60+
for(auto i : res) cout<<i.first<<" "<<i.second<<"\n";
61+
return 0;
62+
}
63+

check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# g++ wo.cpp
99
# ./a.out < in.txt > sol.txt
1010
g++ $1
11-
./a.out < input.txt > out.txt
11+
./a.out < input.txt > out.txt
1212

1313
# if [[ $(diff sol.txt out.txt ) ]]; then
1414
# echo ***********************DIFFERENT ANSWER***********************

in.txt

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
1-
2-
2
3-
5 4
4-
1 2
5-
6 7
6-
9 12
7-
24 24
8-
41 50
9-
10-
8 7 10 9
11-
12-
24 4 14 24
13-
14-
1 1
15-
16-
42 42
17-
181
1
19-
20-
24
2+
ti
3+
Starteatingwellwiththeseeighttipsforhealthyeating,whichcoverthebasicsofahealthydietandgoodnutrition
4+
2
5+
ing
6+
Thedoublehelixformsthestructuralbasisofsemi-conservativeDNAreplication.1,2Lessintuitively,italsohasimplicationsontheinformationcontentofDNAfordouble-strandedDNAassuchonlyhasabouthalfthestoragecapacityofsingle-strandedDNA.Thisisbecauseagivensequenceanditsreversecomplement,whilethesameinthedouble-strandedform,aredifferententitiesinsingle-strandedDNA?exceptforthosesequenceswhichareidenticaltotheirreversecomplement
7+
3
8+
th
9+
Lemierresyndromeiscausedbyaninfectionintheoropharyngealregionwithsubsequentthrombophlebitisintheinternaljugularvein.Thethrombusfromthethrombophlebitiscaninvadeothervitalorgans,suchasliver,lungs,orjoints,resultinginsecondaryinfection,whichfurtherexacerbatesthefatalprognosisofthissyndrome.Lemierresyndrome,alsocalledpostanginalsepsisornecrobacillosis,wasfirstreportedbyDr.Lemierrein1936.Inhisreport,Lemierrementionedthatoutof20patientswhosufferedfromthissyndrome,onlytwosurvived.Healsostatedthatallofthe20patientscomplainedofinfectionsinthepalatinetonsilsanddevelopedsepsisandthrombophlebitisintheinternaljugularvein.Oncecalleda"forgottendisease,"thissyndromeshowedaveryhighmortalityrateuntilusageofantibioticsbecameprevalent
10+
4
11+
tion
12+
Non-applicationdecreasedshootlengthandreducednumberofunnecessarysecondaryshootsby39%comparedwiththeconventionalrate,notaffectingyieldandweight,color,firmness,andsolublesolidsoffruits.Nosignificantdifferencewasalsofoundintheyieldandthefruitcharacteristicsamongthetreesfertilizedwithdifferentrates.Concentrationsofsolublesugars,starch,N,andKofdormantshootsinMarchofthefollowingyearwerenotsignificantlychangedbythedifferenttreatmentsofthepreviousyear.Therewasnosignificantdifferenceofshootgrowthandyieldamongthetreatmentsthefollowingyearwhenthesamefertilizationratewassuppliedtoallthetrees
13+
5
14+
to
15+
Duetoincreasedinterestincharactercostumes,thefieldofanimationcharactercostumedesignisgraduallydevelopingintoaspecializeddomain.Thecostume-makingprocessforanimationcharacterspresentsmanydifferencesfromthecostume-makingprocessforregularapparel.However,thereremainsinsufficientresearchontheactualprocessofmakingthecharactercostumesusedinstopmotionvideosbothinKoreaandabroad.Thepurposeofthisstudyistoestablishacostumedesignprocessforanimationcharacters.Furthermore,thisstudypresentsacasestudyonthecostumeplanningandmakingprocessfor3Dstopmotionanimationcharacters.Thecharactercostume-makingprocesswassegmentalizedintothefollowingstages:characteranalysisstage,charactermodelingstage,andcharactercostumemakingstage
16+
6
17+
by
18+
InKorea,noinstitutionaltoolorregulationexistsbywhicharetailbusinessinchargeofgatheringandmaintainingsubscriberscanbeguaranteedindependencefromthewholesalebusinessdivisionofafixedincumbentproviderofessentialfacilitiessuchasducts,polesandcopperorfibercables,whichmayalsobeofferingthesameproductstoitsrivals.Forthatreason,awholesaledivisionmayhaveanincentivetointentionallydisruptthesharingoffacilitiesrequestedbycompetitiveoperatorsincooperationwiththeretaildivision.Ultimately,thefacilitysharingprocesswillremaininactivewhenthereisalackofequivalentaccesstothefixedaccessnetwork
19+
7
20+
as
21+
Theaimofthisstudywastofindtypologyoffashion-relatedmobileapplicationsthroughexploratoryinvestigationandtoinvestigatedifferencesinKoreaandU.S.Appstores.Andthen,throughthequalitativeevaluationaboutfashionmobileapplications,thisstudyproposesfashionmobileapplication'sdesignandcontentswhichcanbepreferredbyusers.Byconductingkeywordsearchineachstore,122Koreanapplicationsand150USapplicationswereanalyzed.Empiricalfindingsrevealedthatthereweresevenmajortypesoffashionmobileapplications:brand,magazine,information,SNS,game,shoppingandcoordination.Informationtypeapplicationstookupthelargestportion,andSNSandgametypeapplicationsshowedhigherrankingamongcustomers
22+
8
23+
the
24+
rimaryvaricellainfectionusuellyrunsabenignclinicalcourseinthehelthypopulation.However,hemorrhagicchickenpoxpresentswithaveryextensiveeruptionofhemorrhagicvesiclesinpatientswithdecreaedplateletsorimpairedimmunityandisaccompaniedbysevereconstitutionalsymptoms.A7-year-oldmalewasadmiduetoabdompalpainfor1dayandpeneralizedvesiculareruptionfor5days.Theeruptionfirstappearedonthetrunkandthenspreadtoinvolvedface,scalpandextrsmities.Theskinrashwascompatablewithvaricellabutdespitetheadministrationofacclovirintravenously,thevesiculareruptionbecamehemorrhagic.Tendaysafteradmission,havingexperiencedcardiscarresttwiceandwithhismentalstateincoms,hewasdisehargedashissituationwashopelesa
25+
9
26+
of
27+
Thebookconsistsofthirteenchaptersinfiveparts.InthefirstpartHarmlessdescribessomeofthegeneralandreligiousbackgroundtofourth-andfifth-centuryEgypt,whichhelpstoplacewhatfollowsinabroadercontext.InhissecondparthediscussesAntonyandPachomius,althoughheacknowledgesthatAntonyisnotthehistoricalbeginningofmonasticism.HemovesnexttodiscusstheDesertFathers,exploringsomeofthetexts,characters,themes,locations,andhistories.Thisleadsthewayforreflectionsonthetheologyandworksoftwomonastictheologians,EvagriusPonticusandJohnCassian.Itmayseemoddatfirstglancethatthefinalsectionofthebook(��Reflections��)shouldaddresstheoriginsofmonasticism,butHarmlessjustifiesthisfromhisexperienceasaneducator;peoplefinditeasiertoengagewithscholarlydiscussionsconcerningmonasticoriginsoncetheyarefamiliarwiththecharacters,texts,andthemes
28+
10
29+
es
30+
Intheinitialstage,domesticgamesbasedonlineconcentratedongamedevelopmentfocusingonincomeforsomegenres.However,variouscontentsfocusingonsmartenvironmentandsocialnetworkareexpandedatpresentandgamematerialsaredevelopedformorevariousobjects.So,thisstudyintendstoexaminenewcategory,positivegame,fromtheaspectofgamedesignerforgameapproachbasedonvariousobjects.And,gameapproachingprocessinthecategorybasedonpleasurewasorganizedfromthestandpointofdesigner,forthedesignerapproachintheprecedentstageofpositivegamedevelopment.Fromtheaspectofdesigner,systemicityofgamecategoryanddesignapproacharenecessarytoexpandwire-wirelessenvironmentandnewenvironmentbasedontheconvergencemediatointeractivecontentsfocusingongames

input.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
3
2-
2 3 2
3-
1+
1
2+
3 3 3 6
3+
9 6 7
4+
4 3 9
5+
6 4 6
6+
2 1
7+
2 0
8+
0 0
9+
1 0
10+
0 2
11+
1 23

0 commit comments

Comments
 (0)