From 318c90732181c6d6b306ad8d15dd30be931080b6 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 8 Oct 2024 23:11:04 +0800 Subject: [PATCH] =?UTF-8?q?:white=5Fcheck=5Fmark:=20(wip)=20P7911=20?= =?UTF-8?q?=E8=8E=AB=E5=90=8D=E5=85=B6=E5=A6=99=E4=B8=8D=E4=B8=80=E6=A0=B7?= =?UTF-8?q?=20https://www.luogu.com.cn/problem/P7911?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 +- add-oil/main.cc | 18 + network-connection/data.in | 6 + network-connection/data2.in | 11 + network-connection/data3.in | 102 ++++ network-connection/data3.out | 100 ++++ network-connection/data4.in | 1002 ++++++++++++++++++++++++++++++++++ network-connection/data4.out | 1000 +++++++++++++++++++++++++++++++++ network-connection/main.cpp | 57 ++ second-large-number/data.in | 2 + second-large-number/main.cc | 24 + 11 files changed, 2324 insertions(+), 1 deletion(-) create mode 100644 add-oil/main.cc create mode 100644 network-connection/data.in create mode 100644 network-connection/data2.in create mode 100644 network-connection/data3.in create mode 100644 network-connection/data3.out create mode 100644 network-connection/data4.in create mode 100644 network-connection/data4.out create mode 100644 network-connection/main.cpp create mode 100644 second-large-number/data.in create mode 100644 second-large-number/main.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index f643729..a3a3388 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,4 +21,5 @@ add_executable(Playground state-compress-dp/main.cpp sudoku/main.cc take-most-space-element/main.cc - walking-in-maze/main.cc) + walking-in-maze/main.cc + network-connection/main.cpp) diff --git a/add-oil/main.cc b/add-oil/main.cc new file mode 100644 index 0000000..9a3def3 --- /dev/null +++ b/add-oil/main.cc @@ -0,0 +1,18 @@ +#include +#include +#include +using namespace std; +int main() { + int num = 0; + string str; + cin >> str; + if (atoi(str[0]) > 2) { + num++; + } + bool is_feb = atoi(str[1]) == 2; + int days = stoi(str[3].to_string()+str[4].to_string()); + if (days > 30 || (is_feb && days > 28)) { + num++; + } + cout << num << endl; +} diff --git a/network-connection/data.in b/network-connection/data.in new file mode 100644 index 0000000..461bb8d --- /dev/null +++ b/network-connection/data.in @@ -0,0 +1,6 @@ +5 +Server 192.168.1.1:8080 +Server 192.168.1.1:8080 +Client 192.168.1.1:8080 +Client 192.168.1.1:80 +Client 192.168.1.1:99999 diff --git a/network-connection/data2.in b/network-connection/data2.in new file mode 100644 index 0000000..8ac6c81 --- /dev/null +++ b/network-connection/data2.in @@ -0,0 +1,11 @@ +10 +Server 192.168.1.1:80 +Client 192.168.1.1:80 +Client 192.168.1.1:8080 +Server 192.168.1.1:80 +Server 192.168.1.1:8080 +Server 192.168.1.999:0 +Client 192.168.1.1.8080 +Client 192.168.1.1:8080 +Client 192.168.1.1:80 +Client 192.168.1.999:0 diff --git a/network-connection/data3.in b/network-connection/data3.in new file mode 100644 index 0000000..468cbe7 --- /dev/null +++ b/network-connection/data3.in @@ -0,0 +1,102 @@ +100 +Server 249.217.185.41:28390 +Server 58.139.75.150:32916 +Server 164.132.230.103:2805 +Server 230.34.60.10:3192 +Server 8.158.211.70:45542 +Server 102.194.238.18:15088 +Server 101.59.241.186:52427 +Server 115.143.108.72:16537 +Server 161.221.13.212:52047 +Server 7.75.149.236:11770 +Server 108.220.137.165:26957 +Server 121.180.139.110:5392 +Server 12.214.2.248:41461 +Server 158.68.44.93:53435 +Server 97.63.72.59:35064 +Server 220.187.86.78:64381 +Server 59.29.128.91:2717 +Server 140.175.106.200:30566 +Server 245.233.205.228:55782 +Server 205.24.170.47:55248 +Server 103.60.29.80:37007 +Server 223.76.148.124:12954 +Server 80.112.212.73:31448 +Server 244.221.32.22:12816 +Server 140.140.178.160:24540 +Server 98.185.111.15:42673 +Server 219.249.194.5:48754 +Server 80.139.152.191:47985 +Server 103.98.92.158:15313 +Server 112.94.91.98:9353 +Server 203.152.232.46:8570 +Server 64.7.69.2:53535 +Server 70.77.237.205:48715 +Server 63.190.182.194:22734 +Server 167.198.175.203:52975 +Server 231.18.52.239:65074 +Server 30.65.214.84:14567 +Server 185.76.45.166:49771 +Server 173.43.69.196:13369 +Server 85.11.251.17:65259 +Server 151.72.42.94:5341 +Server 169.96.64.212:12779 +Server 114.141.130.157:47652 +Server 217.0.167.240:30040 +Server 187.253.126.242:22788 +Server 33.61.94.253:4080 +Server 254.44.190.153:24278 +Server 146.243.101.66:32070 +Server 80.79.84.224:49562 +Server 63.81.148.7:28810 +Client 81.235.246.73:18305 +Client 59.29.128.91:2717 +Client 33.61.94.253:4080 +Client 220.120.144.227:3377 +Client 64.7.69.2:53535 +Client 58.139.75.150:32916 +Client 187.253.126.242:22788 +Client 100.157.115.70:35513 +Client 102.194.238.18:15088 +Client 103.60.29.80:37007 +Client 140.140.178.160:24540 +Client 203.152.232.46:8570 +Client 63.190.182.194:22734 +Client 231.18.52.239:65074 +Client 54.38.47.208:49299 +Client 161.221.13.212:52047 +Client 219.146.191.132:46238 +Client 219.249.194.5:48754 +Client 63.81.148.7:28810 +Client 103.98.92.158:15313 +Client 121.180.139.110:5392 +Client 173.43.69.196:13369 +Client 244.221.32.22:12816 +Client 195.217.161.202:296 +Client 200.1.184.95:61373 +Client 217.0.167.240:30040 +Client 239.182.127.128:4536 +Client 49.50.201.196:52090 +Client 30.65.214.84:14567 +Client 61.35.102.136:21585 +Client 12.214.2.248:41461 +Client 194.36.60.51:11079 +Client 37.61.94.253:4080 +Client 34.213.35.199:47886 +Client 8.158.211.70:45542 +Client 63.81.148.0:28810 +Client 209.249.194.5:48754 +Client 7.75.149.236:11770 +Client 228.171.11.185:11107 +Client 95.18.63.74:30162 +Client 116.241.162.73:63458 +Client 249.207.124.200:48831 +Client 223.76.148.124:12954 +Client 70.77.237.205:48715 +Client 35.29.90.180:59047 +Client 164.132.230.103:2805 +Client 59.29.128.91:27178 +Client 86.190.70.70:20998 +Client 59.29.128.91:2517 +Client 139.200.25.104:52480 + diff --git a/network-connection/data3.out b/network-connection/data3.out new file mode 100644 index 0000000..0fdaaee --- /dev/null +++ b/network-connection/data3.out @@ -0,0 +1,100 @@ +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +OK +FAIL +17 +46 +FAIL +32 +2 +45 +FAIL +6 +21 +25 +31 +34 +36 +FAIL +9 +FAIL +27 +50 +29 +12 +39 +24 +FAIL +FAIL +44 +FAIL +FAIL +37 +FAIL +13 +FAIL +FAIL +FAIL +5 +FAIL +FAIL +10 +FAIL +FAIL +FAIL +FAIL +22 +33 +FAIL +3 +FAIL +FAIL +FAIL +FAIL diff --git a/network-connection/data4.in b/network-connection/data4.in new file mode 100644 index 0000000..7790eeb --- /dev/null +++ b/network-connection/data4.in @@ -0,0 +1,1002 @@ +1000 +Client 25.71.134.48:30588 +Client 25.71.134.48:00588 +Client 25.71.134.48:305883 +Client 6879287681::07:609027 +Server 53.254727.98:62299: +Client 78.130.139.51:51682 +Client 1::054833:2.7: +Server 50.193.23.89:46872 +Server 100.250.202.27:5224 +Server 5.:05:148288.62 +Client 26.71.134.48:30588 +Client 100.250.202.27:5224 +Server 1117139.1580124:94137 +Client 199.36.250.121:36597. +Server 119.33.64.7:53367 +Server 100.250.202.20:522496 +Server 239.93.98.86:6430 +Client 25:71.134.48:.0588: +Client 212.112.29.226:561018 +Client 43.212.17.131:60012 +Client 25.71.134.48:30588. +Server 225.152.143.177:18650 +Client 180.51.226.5:26024 +Server 139.130.189.162:28130 +Server 163.29.48.109:21528 +Server :894.52801424175.8923 +Client 139.130.189.162:28130 +Server 150.194495.187:467591 +Client 88.81.154.231:24324 +Server 128.109.123.223:33112 +Server 171.10.159.85:58713 +Client 583033:.69:4 +Server 117.255.58.106:37283 +Server 88.81.154.231:24324 +Server 153.233.179.93:64529 +Client 161.79.208.114:18708 +Client :197616::.624::12::23 +Server 033.23.59.154:45249. +Server 155.220.151.33:148610 +Client 143.112.173.29:52878 +Server 50.136.0.88:3680 +Client 160.121.201.211:2411607 +Client 153.233.179.93:645294 +Client 94.23.255.111:29533 +Server 12.15.67.223:18110 +Server 232.109.249.6:4100954.81 +Server 106.176.73.43:22009 +Server 176.146.170.252:36552 +Server 70.13.244.197:4942 +Server 31.229.244.222:585274 +Client 88.81.158.231:943242.129 +Server 126.202.131.61:47527 +Server 171.10.159.85:587133 +Client 176.146.170.252:36552. +Server 43.93.147.21:53560 +Server 187.10.30.61:43553 +Client 25.71.134.4893058896 +Server 189.253.80.219:6241 +Server 59.12.140.227:60602 +Server 186.80.226.9:4541 +Client 186.80.226.9:4541 +Server 154.142.144.79:54464 +Client 50.136.0.88:3680 +Client 225.152.143.107:1865083 +Server 5943818::05:.565222745 +Server 220.97.238.53:30899 +Server 16.204.88.247:65177 +Client 79.130.139.51:516821 +Client 110.209.131.22:404675: +Client 12.15.67.223:08110 +Server .03.6.54.19::427194 +Client 226.28.205.194:27618 +Client 186.202.131.61:47527 +Client 215.153.156.173:50723 +Server 167.246.193.109:19053 +Client 189.253.80.219:6241 +Client 25.71.134.40:30578 +Client 142.181.92.211:14201 +Client 208.65.4.178:2681 +Client 187.10.30.61:43553 +Server 132.42.90.78:15218 +Client 2.172.251.149:453991 +Server 74.181.17.129:4131 +Client :622 +Server 173.223.153.245:18188 +Client 174.61.29.49:59523 +Server 131.191.202.63:52330 +Client 158.2.191.253:44049 +Server 56.180.138.216:54987 +Server 220.122.52.195:51211 +Server 170.57.58.71:11621 +Server 229.238.132754:28664 +Client 74.155.26.70:23577 +Client 142..01.92.211:14201 +Server 237.90.204.167:34380 +Server 136.14.8.14:14404 +Client 50.19..23.89:46872 +Client 153.233.179.93:64529 +Client 237.90.204.477:34380 +Client 88.81.154.231.243248 +Client 128.109.123.223:33172 +Client 220.122.52.195:51211 +Server 225.244.38.205:32434 +Server : +Client 148.1.1.92.211:14201: +Server 250.709167.123:62431 +Server 67.66.123.23:55404 +Server 65.12.96.221:48538 +Server 32766:1.82::6.29.2.94 +Server 4... +Client 154.142.144.79:54464 +Server 1101.12.253:58170 +Client 1:6.80.226.9:4541 +Client 96.98.186.178:23991 +Client 150.244.30.159::7009 +Client 225.152.143.177:18650 +Server 65.17.147.254:171900 +Server 24.165.237.104:62182 +Server 64.87.25.79:25899 +Client 56.180.138.216:549879 +Server 86.235.238.181:462056 +Client 138.2.191.253:44049 +Client 50.136.0.88:36807 +Server 44.98.129.156:65334 +Server 8:1929 +Client 131.191.202.63:52330 +Client 128.248.86.117:21531 +Server 234.28.105.66:18752 +Server 152.177.104.81:4048 +Client 220.97.238.53:30899 +Client 210.9.30.76:1364 +Server 254.2.231.76:32109 +Client 74.181.17.129:4131 +Client 0.60 +Server 113.97.94.210:59051 +Server 90.193.151.82:6512 +Client 234.28.105.66:18752 +Client 167.246.193.109:19053 +Server 99.74.83.2:19998 +Server 175.105.35.227:63841 +Server 25.71.124.48:3058.1 +Server 185.186.75.131:32726 +Client 173.223.153.245:18188 +Server 43.213.192.255:53709 +Client 165.140.199.224:1893214 +Client 67.66.123.23:55404 +Server 174.190.35.96:26926 +Client 22.223.146.222:5364 +Server 215.204.199.93:8647 +Client 207.6.104.14:500831 +Client 97.34034.54:70447287 +Client 82.211.46.11:48999 +Server 226.1.213.10:9691 +Client .11855220 +Client 142.181.92.211:1420128 +Client 125.122.255.102:11451 +Server 29.93.96.231:6010 +Server 85.179.43.5:41687 +Client 24.165.237.104:62182 +Server 117.24.40.7.:39234572 +Server 155.46.201.117:35081 +Server 150.195.223.91:26260 +Client 186.80.226.9:45415 +Server 29.116.65.63:14998. +Client 210.131.206.245:1751580 +Server 59 +Server 3.110.47.21:28119 +Server 96.98.186.178:23991 +Server ..7:35622808817 +Server 1:5.4727.88 +Server 87.29.77.199:38605. +Server 86.78.212.199:36531 +Client 98.121.87.156:5798 +Server 154.229.150.177:24886 +Client 85.179.43.5:41687 +Server 235.188.0.238:36689 +Server 115.20.164.98:9867 +Server 154.95.104.106:4694 +Client 50.136.0.88:36803: +Client 67.66.123.23:55404. +Client 00.193.23.89:468729 +Client 67.66.123.27:554042 +Client 117.255.58.106:37283 +Server 209.140.35.127:54020 +Client 43.213.192.255:53709 +Client 41.249.207.209:61768 +Server 196.119.190.199:4042 +Client 56.180.138.216:54987 +Client 142.181.92.211:14401 +Server 59.235.77.161:40919 +Client 1395130.189.162:28130 +Server 170.158.33.240:58629 +Client 86:5.:43.7.215.61.143.46: +Client 99.74.83.2:19998 +Server 66.176.187.75:48347 +Client 209.140.35.127:54020 +Server 189.85.120.116:61357 +Client 215.246.8.96:58255 +Client 215.204.199.93:8647 +Server 131.150.111.232:41041 +Server 231.92.61.232:5637 +Client 254.2.231.76:32109 +Client 125.122.255.102:11451. +Client 215.204.199.03:86473 +Server 254.127.253.180:43706 +Client 137.42.90.78:15218 +Server .93547:8.1:56:1:3275. +Client 170.158.33.240:58629 +Server 152.33.183.117:29397 +Client 167.246.193.109:190539 +Server 35.40.187.244:27636 +Client 163.20.48.109:215282: +Client .87.06 +Client 85..79.43.5:416879 +Client 225.122:143.177:186507 +Client 156.55.108.236:13330 +Client 185.186075.131:32726 +Server 22.227.99.91:13807 +Client 660174.10.31:34966 +Client 237.90.204.167:34380 +Client 88.204.207.101:28776. +Client 176.146.170.252:36552 +Client 35.40.187.244:27636 +Server 52.3.107.54032011 +Server 162.26.91.29:49723 +Client 225.244.38.205:32434 +Server 203.175.177.24:29840 +Client 126.202.131.61:47527 +Client 64.87.25.79:25899 +Client 189.253.80.219:62418 +Client 12.15.67.223:18110 +Client 170.193.68.184:27586 +Server 201.107.87.59:36655 +Server 114.697.46.138:412417 +Server 0.99.75.149:55221 +Server 11.21.243.92:251436 +Client 153.56.74.224:03494. +Client 135.92.58.220:43797 +Server 53.142.90.106:63335 +Server 212.133.148.22:30236 +Client 226.1.213.10:9691 +Server 119.33.64.7:533674 +Client 4.6.26885: +Client 167.16.127.50:43445 +Server :63.28.484109:215287236 +Server 226.28.205.194:27618 +Server 166.254.193.84:39225 +Server 198.103.214.168:3661605 +Server 104.34.205.157:25559 +Server 174.247.248.254:290779. +Client 59.12.140.227:60602 +Client 65.12.96.221:48538: +Client 166.254.193.84:39225 +Client 102.231.1.197:587953 +Client 878 +Server 140.232.34.181:46657 +Client 667:3982199477359333: +Client 115.20.164.98:9867 +Server 38.213.242.26:53348 +Server :9070. +Server 45.192.177.132:19821 +Client 53.142.90.106:63335 +Server 59.04049:228:9394:074:937 +Client 247.4.131.189:340172 +Client 530142.90.106:633359 +Client 235.188.0.238:36689 +Server 8.592.954:3084:2593 +Server 37.43.40.233:269596 +Client 186.80.226.9:4.41 +Client 8695::2 +Server 102.56.242.178:10635 +Server 126.10.0.193:9066 +Client 126.202.131.61:47527. +Client 248.53.68.1:5932.0 +Server 27.62.189.242:49717 +Server 125.27.81.241:21973 +Client 50.193.23.89:46872 +Client 132.181.92.211:142017 +Client 154.142.144.79:5446405 +Server 82.211.46.11:48999 +Server 52.241.37.48:2911 +Client .4.155.26.70:2357715 +Client 176.155.112.108:30915 +Client 93.37.123.123:133353 +Client 402 +Server 34.47.203.1:17992 +Server 26.81.54.49:505060 +Client 139.130.189.162:28130: +Client 131.150.111.232:41041 +Client 163.29.48.1097215.80 +Client 52.241.37.48:2911 +Client 29.93.96.231:6010 +Server 76.116.150.165:9303 +Client .15.246.8.96:58255 +Client 876.146.170.252:36552 +Server 27728:0676010:58:8467545: +Client 35.40.187.244:07636 +Client 5:9739.671130809 +Client 119.33.64.7:53367 +Server 120.121.8.64:56850 +Client 136.14.8.14:14404 +Client .73:.1 +Server 16.110.230.230:55478 +Client 2:8:2::::3 +Client ::.7..0: +Client 235.18890.238:36689 +Client 148.120.27.202:602.71 +Client 16.110.230.230:55478 +Server 85.19.216.151:47884 +Client 74.181.17.129:613609 +Client 245.199.5.143:26642 +Server 25.71.134.48:30588 +Client 180.510226.5:26028 +Server 219.17.253.122:50747 +Client 04.4.387::464...61 +Server 142.184.92.211:14201 +Server 22.223.1461222:5364077 +Server 227.232.06.84:76790 +Client 88:1839833:..1.:9:51:89 +Client 61735.7972..:61:5503. +Client 25.71.134.4::30588 +Server 114.186.10.208:1071 +Client 155.46.201.117:35081 +Server 97.109.41.242:40146 +Client 170.158.33.240:596298 +Client 126.202.131.61:4752791 +Server 3.122.21.143:36823. +Server 174.156.245.113:51034 +Server 28.6.198.206:782247 +Server 9.35.159.162:30859 +Server 145.253.4.199:10770 +Client 120.121.8.64:56850 +Server 185.2.84.182:17619 +Client 99.147.30.56:54505 +Client 201.107.87.59:36655 +Server 6.120.4.28:35347 +Server 169.49.220.128:1666 +Server 14.181.108.212:25419 +Server 109.191.45.80:28902 +Client : +Client 25.71.134848:30588 +Server 200.30.164.94:44393 +Server 709:.6051:6...218 +Server 50.142.132.159:23265 +Client 136.66.79.207:55616 +Client 191.116.193.34:44469 +Server 119.29.170.187:10232 +Server 50.193.23.89:46772 +Client 152.177.104.81:4048 +Client 174.21.236.187:29658 +Server 177.247.219.233:42973 +Client 30.182.226.37:17892 +Server 53.47.164.117:63077 +Client 34.235.109.226914146 +Server 58.121.139.144:34181 +Server 209.51.190.29:17272 +Client 143.114.82.59:49369 +Server 115.98.198.224:34428 +Server 937 +Client 288.65.4.178:2691 +Server 213.145.138.34:0814 +Server 29.151.177.92:58268 +Server 143.112.173.29:52878 +Server 11 +Client 3.110.47.21:281196 +Client 174.156.245.113:510349 +Client 89.252.102.204:21005 +Server 217.94.62.30:10482 +Server 42:5..8 +Client 25.71.134.48:3058827. +Client 152.177.104.81:4048:9 +Client 162.22.219.76:9015 +Client 5:.136.0.88:3680 +Client 15:.233.179.93:64529:: +Server 191.239.3.146:28977 +Server 176.46.248.165:278459 +Client .17.29.1706187:102320389 +Client 50.142.13:.159:232658 +Client 212.155.60.25:23383 +Server 123.194.66.94:31704 +Server 231.170.64.1:41839 +Server 28.135.222.106:35683 +Client 97.10..41.242:40146 +Server 00.51 +Client 151.165.138.159:15069 +Client 174.190.35.96:26926 +Client 87.206.66.253:63865 +Client 25.71.034.48:30588 +Client 189.85.120.116:61357 +Client 118.38.195.814:23815 +Server 105.70.147.176:526116 +Client 8898:9:6:0:6.:5.732::0 +Client 217.172.94.263:18324 +Server 211.26.254.204:18700 +Server 116.6.77.168:53036 +Client 7107.24292:0..:..0 +Client 005..690181 +Client 56.180.138.216:549877 +Server 646..77:458..109386432 +Server 203.175.177.24:2984013 +Client 115.98.198.224:37428. +Client 84.87.25.79:25899 +Client 6734.210:7961288.7: +Client 44.98.129.156:65334 +Client 131.150.111.232:410413 +Server 129.42.137.48:44896 +Server 228.81.172.251:55096 +Client 0761:538896:.4 +Client 6.120.4.28:35347: +Server 59.12.140.227:606027 +Server 53.191.194.56:27503 +Client 2 +Server 4.74.193.149:31676: +Server 240.148.1708111:6486961 +Client 873.223.153.24.:1818. +Client 30.158.236.88:75234 +Server .12.239.51.134:489235 +Client 27.118.35.134:60665 +Server 74.39.102.51:28740 +Client 74.39.102.51:28740 +Server 131.109.137.159:56095 +Server 3.76.79.100:17700 +Server 198.146.3.210:45553 +Server .3:2277 +Server 178.154.182.67:38717 +Client 25.71.134.4.:3058834 +Client 747.3:644:758.0546455 +Client 207.40.144.193:45747 +Server 136.32.251.34:17725 +Client 128.109.123.223:33112 +Server 135.80.53.30:33972 +Server :8..343 +Client 50.142.132.159:232652 +Client 179.184.183.145:.61545 +Client 242.22.6.107:258359 +Server 71.9.160.156:51035 +Client 8.50:6:9:73214692035: +Client 2:.:37325589:19537 +Server 90.120.42.158:62778 +Server 211.268254.204:187003: +Client 59.168.241.193:62957 +Client 0:1:51690650:286071.:4 +Server 78.107.94.136:74 +Server 88.67.173.121:21069 +Client 170.158.33.240:586292 +Server 162.198.234.45:9847 +Server 72.174.5.196:21886 +Client 176.174.97.182:391 +Client 220.240.21.195:8116 +Server 98.2537193.8:32371 +Server 235.86.157.172:3144 +Client .4.0438198.0465.3. +Client 245.151.162.54:36594 +Server 185.2.84.18::97619 +Client 85.19.216.151:47884 +Client 34.47.203.1:17992 +Server 102.10.43.119:5149 +Server 158.157.213.184:26687 +Server 50.123.102.47:13234 +Client 28.135.222.106:35683 +Client 0.42.82.60:33484 +Server 160.28.56.11:57168 +Server 90.233.162.237:292083 +Server 8:.179.43.5:406871 +Client 135.80.53.30:33972 +Client 00.121742.158:627783 +Client 520241.37.:8:2911 +Client 176.174.974182:39176 +Server 199.234.96.28321732 +Client 198.146.3.210:45553 +Client 142.181.92.211:14201: +Server 103.220.154.191:25875 +Client 45.192.177.132:19821 +Client ..96:5448:::..:67951:: +Client 22.227.99..1:.3807 +Client 948. +Client 108.61.19.93:57850 +Client 88.67.173.121:21069 +Server 80.51.130.14:31090 +Client 213.79.179.131:49363 +Server 9 +Server . +Server 120.121.8.67:5651067 +Server 5.136.186.704:1945465 +Server 122.94.54.163:60684 +Client 103.220.154.191125875 +Client 223.30.97.246:40916 +Server 193.94.149.75:63473 +Server 466.24 +Client 78.1.0.139.51:51682 +Client 53.142.90.106:633355 +Client .1506 +Client 27.62.189.242:49717 +Server 9:5.8049747 +Client 35..825:5 +Client 240.103.85.72:557268 +Client 160.28.56.11:5916796 +Client 125.54.96.244:2934 +Server 250.51.220.92:10047 +Server 62183.:.3813642.89: +Client 28.135.222.006:35683 +Server 231.145.145.228:3159 +Server 239.93.98.86:64309 +Client 239.93.98.86:6430 +Server 249.106.165.17:36129 +Server 166.28.44.62:4.127977 +Server 110.27.172.106:11372 +Client 86.78.212.199:36531 +Server 134.211.758.23:62047 +Server 158.253.17.198:7488 +Server 238.188.92.113:61766 +Server 51.73.184.4:46036 +Client 239.93.98.86:64309 +Client 167.87.2.159:63918 +Client 187.10.30.61:435537 +Server 120.120.143.189:19485 +Server 107.127.52.11:59912 +Client 187.10.30.61:435533 +Client 131.191.202.63:52130 +Server 13.215.21.229:47919 +Server 214.185.185.225:23713 +Server 137.116.146.33:31336 +Server 195.33.239.35:45202 +Server 12.59.253.192:46263 +Server 28820.239.67:318214 +Server 49.44.170.115:0715 +Client 200.30.164.94:44393 +Server 7.108.624160:49845 +Client 174.190.35.96:268267:8 +Server 6659:442.:124464 +Client 71.9.160.156:51035 +Server 18.102.130.63:417396 +Client 174.190.35.96:269268 +Client 060886:39:2:1 +Client 179.81.62.67:63337 +Server 58.102.239.130:25640 +Client 054.1.7.253.180:43706 +Client 107.127.52.11:59912 +Client 108.204.162.221:18203 +Server .379154898.1.377:0.2040 +Server 89.153.237.79:21445 +Server 90.170.110.139:07725 +Server 148.11.57.143:13239: +Client 53156:2.130:1536517 +Client 64.206.146.224:56932 +Server 250.152.7..122:18228 +Client 139.148.97.70:16103: +Server 118.243.26.124:14257 +Client 247.192.209.75:3288 +Server 171.18.179.79:10142 +Server 106.20.177.252823980 +Client 213.79.179.131:47363 +Client 24.165.237.104:621823 +Client 27460 +Server 128.98.39.32:27776 +Client 96.81.97.191:48127 +Server 57.249.17.224:32589 +Client 1730223.153.245:18188 +Server 123.118.107.126:18993 +Server 23.118.221.156:2813 +Server 201.112.94.39:59817 +Server 178.54.86.244:17231 +Client 053 +Client 58.121.139.144:34181 +Client .34.0.22:87745:3.4551: +Server 80.199.65.207:297 +Client 116.6.77.168:530368 +Server 170.207.122.36:44394 +Server 54.142.119.27:540361 +Client 129.191.65.145:19470 +Client 123.118.107.126:18993 +Server 43.216.161.84:46733 +Client 176.130.32.62:56504 +Client 96.110.230.230:52478 +Server 101.196.210.156:192532 +Client 177.128.123.174:24409 +Client 6.160.31.229:53863 +Server 20.223.74.62:4964 +Server 37.69.216.19:10513 +Client 126.10.0.193:9066 +Client 235.86.157.172:3144 +Client 82.12.100.145:28532 +Server 136.2248993.84:392259324 +Server 1:::5501675:4164.5 +Client 249.106.165.17:36129 +Server 72.76.52.6:51976 +Server 170.31.83.158:59479 +Client 129.42.137.48:44896 +Client 88.67.178.121:21069.. +Client 120.121.8.64:568500: +Server 50.136.0.88:368073 +Client 3377::.:36...3210:30.4: +Server 128.46.123.148:48259 +Client 162.22.219.76:.015 +Server 225.179.200.94:27320 +Server 87.122.128.132:221941 +Server 52.219.121.240:35928 +Server 135.174.128.25:15766 +Client 153.156.87.39:50224 +Client 25.71.134.48:305882: +Client 516931:647 +Server 106.209.48.61:6526 +Client 254.0.231.76:32109 +Client 50.136.0.88:3.80 +Server 24.125.11.200:23357 +Client 35.40.187.244:27636:3 +Client 102.10.43.119:5149 +Server 100.30.156.106:45946 +Client 144.89.86.212:209588 +Client 59.235.77.161:409199 +Client 9.914.::36 +Server 212.155.60.25:23383 +Server :1:677569 +Client 75.71.134.48:30588 +Client 132.42.90.78:15218 +Client 23.118.221.156:28130 +Server 205.68.147.239:654859 +Server 121.246.210.146:8781 +Client 176.130.32.62:5650. +Server 201.107.87.59:36655: +Client 203.175.177.24:29840 +Client 191.176.1.237:9821 +Server 109.221.146.137:45783 +Client 170.158.33.260:58629 +Client 121.246.210.146:8781 +Client 16.110.230.230:55478. +Client :3.:75741:1:617280:77099. +Server 153.241.123.198:60984 +Client 131.109.137.159:56095 +Server 19.189.81.223:25355. +Client 29.93.96.231:5010 +Server 242.18.211.9:57173 +Server 176.104.35.176:25358 +Client 02:029.7.893 +Client 234.28.105.66:1875295 +Server 69.124.145.196:734 +Server 70.97.122.220:39380 +Client 226.28.2054199:27618 +Client 111.87.146.57:30898 +Client 231.145.145.228:3159 +Client 74515 +Server 41.175.193.144:11599 +Client 66.188.124.152:21715 +Client 137.214.216.161:11748 +Client 177.247.219.233:42973 +Client 6.120.4.28:35347. +Client 0.99.75.147:553210 +Server 84.4.90.156:21203 +Server 138.126.136.781:3661: +Client 29.93.96.271:60105 +Server 105.110.188.225:48472 +Client 27240:23.3 +Server 87.206.66.253:63865 +Client 107.127.52.11:599125 +Client 91.94.66.77:64388 +Client 187.173.134.177:14983 +Server 213.79.179.131949363 +Client 82.12.100.145:2853262 +Server 23.137.5.80:28560 +Client 109.221.146.137:45783 +Server 194.109.233.10:55258 +Server 255.107.170.27:3082. +Server 69.185.249.92:58400 +Client 177.247.219.233:420739 +Server 1.121.109.24:2656 +Server 4.83:990:6:6.:5538. +Server 144.45.160.144:63378 +Client 220.122..2.195:51218 +Server 124.105.163.159:281573 +Client 119.47.195.36:353531 +Server 206.208.154.222:32986 +Server 168.37.218.197:10641 +Server 114.58.87.253:15939 +Client 120.149.140.224:12514 +Client :95.:.35.:2 +Server 75.15.73.46:7353 +Server 177.128.123.174:24409 +Client 79.144.86.001:55740 +Client 57.249.17.224:32589 +Server 191.79.208.114:18708 +Client 196.119.190.199:4042 +Client 24.125.11.200:23357 +Client 154.229.150.177:24886 +Server 133.44.187.205:43446 +Server 158.197.248.255:20129 +Client 1.3.44.1.7.20::43446 +Server 163.185.100.112:297 +Client 42.42.121.107:60546 +Server 13.55.213.50:51354 +Server 68.147.35.143:7 +Server 3:31.1444.9416..6 +Client 143.112.173.29:5283862 +Client .203.61858:2. +Client 237.90.204.167:343804 +Client 47.20.43.157:22799 +Client 210.135.39.193:14168 +Server 30.95.85.139:27008 +Server 95.70.64.95:21193 +Client 217.94.62.30:10482 +Server 238.6.94797:187853 +Server 44.171.91.32:26423 +Client 125.37.188.194:25753 +Server 190.4.180.250:7176 +Server 42.207.27.218:57445 +Client 176.130.32.62:56904 +Server 236.1:0.115.51:311084 +Server 125.138.224.112:48625 +Server 190.73.121.135:33153 +Client 38.213.242.26:53348 +Server 184.148.224.221:44045 +Server 127.119.167.223:53604 +Server 135.125.103.12:9140 +Client 220.97.238.53:30899:: +Client 227.45.71.82:61708 +Client 172.97.1.210:11882 +Server 45.44.75.22:5290 +Client 0:6.867...82...9:517: +Server 74.39.102.51:28740. +Server 199.230.03.2:2:585889 +Server 207.35.2.2.199:576463. +Server 55.249.131.111:60031 +Client 237.173.174.231:8661 +Server 142.101792.211:742017 +Server 202.35.214.8:11146 +Server 97.222.186.237:34166 +Server 125.27.81.241:2197344 +Server 114.47.42.154:32137 +Client 234.28.105.66:15752 +Client 96.175.12.91:28309 +Server 236.105.77.227:45525 +Server 26:154:0 +Client .2:30:76 +Client 953916201.042 +Server 113.14.30.135413051 +Server 93.115.236.149:34454 +Client 3.110.47.21:28119 +Server 559:39:9.7256:6.90: +Client .47:35855:..026 +Client 117.246.174.247:36311 +Client 12059399 +Client 31.149.78.191:31817 +Server 121.177.147.199:57594 +Client 715014..86:.40:.9 +Client 225.102.67.83:48243 +Server 209.94.60.102:13891 +Client 47.196.69.35 +Server 56.166.254.72:46573 +Client 80.199.65.207:297 +Client 3.841:9517331309989:5 +Client 295.153.156.173:50723 +Server 21.6.173.247:56867 +Client 1.121.109.24:26561 +Server 81.157.169:38:629595 +Client 226.147.174.254:559128 +Server 117.45.50.230:29446: +Client 072:844 +Server 187.54.168.199:28463.5 +Server 66.231.3.90:44 +Server 08.60 +Server 232.153.111.209:48666 +Server 142.110.151.107:28019 +Client 252.112.113.94:42535 +Client .9.147.9..56:54505166 +Server 0.42.82.60:33484 +Client 171.10.159.85:58713 +Server 26.16.48.165:43611 +Server 8.0.58.2 +Server 238.236.111.74:63060 +Client 85.19.213.151:47884 +Client 190.239.3.146:28977 +Client 209.140.35.127:54020: +Client 9..1:9.41.042:401463 +Client 1326157.117.225:36917::4 +Server 49.161.166.5:608669 +Client 230.140.1676180:6424691: +Server 59.174.41.44:31671 +Client 109.191.45.80:28902 +Server 204.177.159.71:53300 +Server 162.113.127.220:59217 +Server 245.41.2.202:26231 +Client 2427852:: +Client 13.215.21.229:47919 +Server 196.218.139.211:9514 +Client 84.4.90.156:21203 +Client 64.87725.79:25899 +Server 71.73.157.108:1444 +Server ..160.31.229:538631 +Server 100.70.68.1:32971 +Server 255.107.113.217:41996 +Server 059:.88 +Server 175.83.166.69:22364 +Client 186.80.226.9:454147 +Server 6.64.183.85:52327 +Client 235.188.0.233:9668931 +Server 211.211.215.162:17465 +Server 21.142.141.2:37240 +Client 1.5215.21.229:47919 +Server 21..215.64.141:64.02 +Server 45.251.62.243:626542 +Server 28.14.40.55:41047 +Server :::.7..9.87763:37:44301 +Client 249.106.165.17:361295 +Server 96.175.12.91:283096 +Server 102.56.59.200:58169. +Server 87.173.143.169:561519 +Client 59.168.241.193:60957200 +Client 220.114.38.197:3553 +Server 232.16.100.190:30409 +Client 6.160.31.229:538635 +Server .71:96..:73003205988.2 +Client 50.136.0.88:368062 +Server 210.67.247.71.42843 +Client 125.27.81.241:21973 +Client 173..23.153.245:18188 +Server 22.245.2.216:31255 +Client 108.200.162.221:182030 +Server 83:0768:5:53281 +Client 116.153.168.71:41810 +Server 204.31.106.150:239453 +Server 108.211.481220:39235: +Client 76.241.215.229:248396048 +Server 80.80.105.192:409622 +Client 9035.159.162:308597 +Client 153.241.123.198:60984 +Client 3.214465256::.3142 +Client 189.253680.219:6241.8 +Server 48.171.209.75:53 +Server .8.8.7:76::2946..0.6:4.6 +Client 91. +Client 107.127.52.11:599120 +Client 107.44.46.62:151 +Client 44.171.91.32:26423 +Client 007.127.52.11:59912. +Client 8.:33.716..47.94164. +Client 41.150.234.130:26685 +Client 72.174.5.195:2188625. +Server 85.143.254.18:8102 +Server 82.12.100.145:2853204 +Server 176.104.35.176:253586 +Server 42.234.194.251:4860227 +Server 10.0.75.23:37674 +Client 230.197.90.236:11295 +Client 170.57.58.71:11621 +Client 8.25.3.17:4294967297 +Client :.015.34.. +Server 162.238.159.130:246425 +Server 225.226.59.85:45434 +Server 115.238.77.146:2248 +Server 24.7.228.146:10316 +Client 35.40.187.244:276364 +Client 90.207.21..56:2419688 +Client 195.19.213.46:46458 +Client 126.202.431.61:47527 +Client 114.186.10.208:1071 +Server 127.9.249.159:38263 +Server 29.68.50.5993131.25 +Client 64.87.25.79:208997 +Server 9.190.184.238:31389 +Client 220.114.38.197:355348 +Client 115.20.164.90:9867.3 +Server 152.190.49.92:48715 +Server 148.78.143.024:19771 +Client 106.176.73.43:220093 +Client 252.226.206.9:14924 +Server 167.155.88.101:55327 +Server 807199.65.207:297283 +Server 220.114.38.197:35538 +Server 164.91.41.48:26883 +Client .441128::65962:9873 +Client 52.219.121.249:35928 +Client 41.175.193.144:11599 +Client 80.51.130.14:31090 +Server 252.201.43.137:16397 +Client 63.0.64.156:51124 +Server 93.115.236.149:34454.32 +Server ::1663.:4.82827.1 +Client 36.61.231.23:26512 +Server 2:89569. +Server 105.128.80.86:2360 +Client 115.134.72.39:32173 +Client 131.191.202063:52330 +Client 114.58.87.253:15939 +Client 20.71.134.48:30588 +Client 162.198.234.40:9847. +Client 49.212.58.13:46378 +Server 24.68.132.252:49085 +Client 663:.:7:9.16.66 +Server 180.48.212.4:9521 +Client 69.184.249.22:2840070 +Client 95.18.177.183:18738 +Client 8.0.110.160:21426 +Server 104.167.57.186:568035 +Client 171.18.179.79:1014299: +Client 106.10.0.193:9066 +Client 615.204.199.93:86470 +Client 6.3..1:3.6251 +Client 174.61.29.49:590236 +Server 250.68.94.174:20025 +Server 83.222.214.33:23426 +Server 183.200.101.79:4476 +Client 11..87.146.57:30898:7 +Server 2.116.82.70:34704 +Server 40.61.27.123:31946 +Client 6.120.4.28.353470. +Client 23.159.168.79:35339 +Server 205.191.44.217:329225 +Client 89.153.237.79:21445 +Client 66.231.3.90:446 +Client 107.10.43.119:51491 +Client 709.191.45.80:289025 +Server 29.125.159.16:6855 +Server 245.6.193.29:60271 +Client 90.193.151.82:6512 +Server 31.36.34.141:65025 +Client 51.73.184.4:46036 +Client 242.18.211.9:57173 +Client 190.127.112.82:1039 +Server 165.237.207.153:32826 +Server 197.136.109.224:3851 +Client 142.110.151.107:28019 +Server 83.71.94.236:10407 +Server 213.46.136.91:36237 +Server 249.243.1:2.182:38635 +Server 47.210.162.124:45422 +Server 168.204.155.72:116.6 +Server 125.19.129.117:27218 +Client 097.136:1096224:385107 +Client 71.9.16:.156:510358 +Server 46.216.181.113:22061 +Client :0::996977:575 +Server 119.225.192.124:6254 +Client 29193.96.231:60105 +Server 129.190.133.254:45576 +Server 23.15.168.35:23814 +Server 115.251.49.169:45896 +Server 176.190.202.70:21633 +Client .93416:833737713743.7:6 +Client 090.218.28.37:49199 +Server 47.225.163.234:4457048 +Client 21.97.146.216:50872 +Server 67.48.108.140:58281.4 +Server :39.130.189.162728130. +Server 170.182.78.39:15704 +Client 143.112.17..29:5287840: +Client 152.190.49.92:48715 +Server 76.131.57.7:53604 +Client 212.133.148.22:30236 +Client 153.15108.103::020 +Client 163.163.247.192:572542 +Server 206.13.212.190:41981 +Server 298543 +Client 99.44.130.86:3205 +Server 154.58.161.139:159426 +Client 129.190.133.254:45576 +Client 167.155.88.101:55327 +Server 84.154.217.59:2293014 +Server 22.119.14.134:22355 +Client 235.167.15..82:45342 +Server 133:429.19 +Client 230.248.173.231:2064 +Client 160.251.212.7:55048 +Client 47.210.162.124:45422 +Server 4.26.136.126:49780 +Client 4.2099.1295: +Client 34.186.202.116:9181 +Client 180.51.226.5:26024: +Client 117.255.58.106::7283 +Client 38.22.1:.26.:2 +Client 123.194.66.94:31704 +Client 235.188.09230:36689 +Server 54.1.17.41:36257 +Server 178.92.104.37:13164 +Client 170.202.122.36:4439470 +Client 2994:48 +Client 44.98.129.156:653340 +Server 07.627..665:3738:6: +Client 230.123.143.218:44636 +Server 109.221.146.237:45783 +Client 3:504..9662532.727924 +Server 110.202.237.211:603847 +Server 74.155.26.70:23577 +Server 161.107.23..31:18.35 +Client 76.131.57.7:53644 +Client 84.14.140.198:3186 +Server 27.246.161.123:31715 +Client 1.121.109.24:2656 +Server 179.90.115.156:54168: +Client 179.130.189.162:2813075 +Client 226.28.200.194: +Client 4:7095.89.:20 +Server 142.181.92.211:14201 +Server 220.114.38.197:3553 +Client 235.188.0.238:366893 +Client 174.15..245.113:510349 +Server 217.153.81.1:20320 +Server :007054:256 +Client 196.119.190.199:40426 +Client 212.133.148.22:30736 +Client ..99.75.149:5522847 +Client 910.135.39.1933141680 + diff --git a/network-connection/data4.out b/network-connection/data4.out new file mode 100644 index 0000000..cc1639a --- /dev/null +++ b/network-connection/data4.out @@ -0,0 +1,1000 @@ +FAIL +ERR +ERR +ERR +ERR +FAIL +ERR +OK +OK +ERR +FAIL +9 +ERR +ERR +OK +ERR +OK +ERR +ERR +FAIL +ERR +OK +FAIL +OK +OK +ERR +24 +ERR +FAIL +OK +OK +ERR +OK +OK +OK +FAIL +ERR +ERR +ERR +FAIL +OK +ERR +ERR +FAIL +OK +ERR +OK +OK +OK +ERR +ERR +OK +ERR +ERR +OK +OK +ERR +OK +OK +OK +60 +OK +41 +ERR +ERR +OK +OK +ERR +ERR +ERR +ERR +FAIL +FAIL +FAIL +OK +58 +FAIL +FAIL +FAIL +56 +OK +ERR +OK +ERR +OK +FAIL +OK +FAIL +OK +OK +OK +ERR +FAIL +ERR +OK +OK +ERR +35 +ERR +ERR +FAIL +90 +OK +ERR +ERR +ERR +OK +OK +ERR +ERR +62 +ERR +ERR +FAIL +ERR +22 +ERR +OK +OK +ERR +ERR +FAIL +FAIL +OK +ERR +87 +FAIL +OK +OK +66 +FAIL +OK +83 +ERR +OK +OK +128 +75 +OK +OK +ERR +OK +85 +OK +ERR +107 +OK +FAIL +OK +ERR +ERR +FAIL +OK +ERR +ERR +FAIL +OK +OK +118 +ERR +OK +OK +FAIL +ERR +ERR +ERR +OK +OK +ERR +ERR +ERR +OK +FAIL +OK +158 +OK +OK +OK +ERR +ERR +ERR +ERR +33 +OK +144 +FAIL +OK +89 +FAIL +OK +ERR +OK +ERR +139 +OK +184 +OK +FAIL +149 +OK +OK +132 +ERR +ERR +OK +FAIL +ERR +192 +OK +ERR +OK +ERR +ERR +ERR +ERR +FAIL +ERR +OK +ERR +95 +ERR +48 +211 +ERR +OK +103 +OK +52 +119 +FAIL +45 +FAIL +OK +ERR +OK +ERR +ERR +FAIL +OK +OK +153 +ERR +ERR +FAIL +ERR +OK +OK +ERR +OK +ERR +59 +ERR +247 +ERR +ERR +OK +ERR +177 +OK +ERR +OK +239 +ERR +ERR +ERR +176 +ERR +ERR +ERR +ERR +OK +OK +ERR +ERR +OK +OK +8 +ERR +ERR +OK +OK +ERR +FAIL +ERR +ERR +OK +ERR +ERR +200 +ERR +281 +157 +OK +ERR +ERR +ERR +ERR +ERR +15 +OK +96 +ERR +OK +ERR +ERR +ERR +ERR +303 +OK +ERR +FAIL +OK +ERR +OK +ERR +OK +ERR +ERR +ERR +ERR +ERR +OK +161 +OK +ERR +ERR +ERR +OK +ERR +OK +OK +300 +OK +FAIL +233 +OK +OK +OK +OK +ERR +ERR +OK +ERR +OK +FAIL +FAIL +OK +OK +129 +FAIL +OK +FAIL +OK +ERR +OK +OK +FAIL +OK +ERR +ERR +ERR +OK +OK +ERR +ERR +ERR +FAIL +OK +ERR +ERR +ERR +FAIL +ERR +ERR +OK +ERR +ERR +ERR +FAIL +OK +OK +OK +ERR +ERR +FAIL +147 +FAIL +ERR +197 +ERR +ERR +ERR +ERR +OK +OK +ERR +ERR +ERR +ERR +ERR +ERR +FAIL +ERR +124 +ERR +OK +OK +ERR +ERR +ERR +OK +ERR +ERR +ERR +ERR +ERR +ERR +FAIL +OK +419 +OK +OK +OK +ERR +OK +ERR +ERR +FAIL +OK +30 +OK +ERR +ERR +ERR +ERR +OK +ERR +ERR +OK +ERR +FAIL +ERR +OK +OK +ERR +OK +OK +FAIL +FAIL +ERR +OK +ERR +FAIL +ERR +309 +286 +OK +OK +OK +382 +FAIL +OK +ERR +ERR +431 +ERR +ERR +ERR +ERR +423 +ERR +OK +261 +ERR +ERR +ERR +FAIL +444 +OK +FAIL +ERR +ERR +ERR +ERR +OK +ERR +FAIL +OK +ERR +ERR +ERR +ERR +275 +ERR +ERR +ERR +ERR +FAIL +OK +ERR +ERR +OK +OK +17 +OK +ERR +OK +172 +ERR +OK +OK +OK +503 +FAIL +ERR +OK +OK +ERR +FAIL +OK +OK +OK +OK +OK +ERR +ERR +342 +ERR +ERR +ERR +436 +ERR +ERR +ERR +FAIL +OK +ERR +517 +FAIL +ERR +OK +ERR +ERR +ERR +FAIL +ERR +ERR +OK +FAIL +OK +ERR +FAIL +ERR +ERR +OK +FAIL +OK +ERR +OK +OK +OK +OK +ERR +355 +ERR +OK +ERR +OK +ERR +FAIL +559 +OK +FAIL +FAIL +ERR +FAIL +FAIL +OK +OK +272 +451 +FAIL +ERR +ERR +505 +OK +OK +406 +ERR +ERR +ERR +ERR +OK +ERR +OK +ERR +OK +OK +FAIL +ERR +ERR +OK +FAIL +ERR +OK +ERR +457 +OK +ERR +ERR +ERR +OK +ERR +FAIL +81 +FAIL +ERR +OK +ERR +ERR +227 +FAIL +OK +ERR +618 +ERR +ERR +OK +421 +ERR +FAIL +OK +OK +ERR +ERR +OK +OK +ERR +FAIL +502 +ERR +OK +FAIL +FAIL +351 +ERR +ERR +OK +ERR +ERR +OK +ERR +OK +ERR +FAIL +FAIL +ERR +ERR +OK +623 +OK +ERR +OK +ERR +OK +ERR +OK +ERR +ERR +ERR +OK +OK +OK +FAIL +ERR +OK +OK +ERR +557 +OK +187 +605 +174 +OK +OK +ERR +OK +FAIL +OK +OK +ERR +ERR +ERR +ERR +FAIL +FAIL +OK +OK +368 +ERR +OK +FAIL +OK +OK +FAIL +ERR +OK +OK +259 +OK +OK +OK +ERR +FAIL +FAIL +OK +ERR +ERR +ERR +ERR +OK +FAIL +ERR +OK +OK +ERR +OK +FAIL +FAIL +OK +ERR +ERR +ERR +ERR +OK +167 +ERR +ERR +FAIL +ERR +FAIL +OK +ERR +FAIL +OK +ERR +OK +566 +ERR +ERR +OK +FAIL +ERR +ERR +ERR +ERR +ERR +OK +ERR +OK +OK +FAIL +ERR +OK +31 +OK +ERR +OK +FAIL +FAIL +ERR +ERR +ERR +ERR +ERR +OK +339 +OK +OK +OK +ERR +520 +OK +648 +ERR +OK +ERR +OK +OK +ERR +OK +ERR +OK +ERR +OK +OK +ERR +ERR +ERR +OK +ERR +ERR +ERR +ERR +ERR +ERR +FAIL +OK +ERR +ERR +ERR +ERR +276 +ERR +OK +ERR +ERR +FAIL +ERR +ERR +ERR +ERR +ERR +628 +ERR +ERR +OK +ERR +ERR +ERR +FAIL +701 +ERR +ERR +FAIL +ERR +OK +ERR +ERR +ERR +OK +FAIL +91 +ERR +ERR +ERR +OK +OK +OK +ERR +ERR +FAIL +ERR +322 +OK +ERR +ERR +OK +ERR +ERR +OK +ERR +ERR +FAIL +OK +ERR +OK +OK +ERR +FAIL +642 +479 +OK +FAIL +ERR +ERR +FAIL +ERR +OK +FAIL +ERR +673 +FAIL +ERR +FAIL +OK +ERR +OK +ERR +FAIL +FAIL +ERR +ERR +FAIL +ERR +ERR +ERR +OK +OK +OK +ERR +OK +OK +ERR +FAIL +ERR +541 +FAIL +FAIL +ERR +OK +OK +136 +OK +512 +632 +FAIL +OK +OK +761 +OK +OK +ERR +OK +ERR +OK +ERR +ERR +OK +ERR +OK +ERR +OK +OK +OK +OK +ERR +ERR +ERR +FAIL +ERR +ERR +OK +ERR +861 +OK +240 +ERR +ERR +OK +ERR +FAIL +ERR +933 +865 +ERR +OK +ERR +ERR +FAIL +FAIL +924 +OK +ERR +FAIL +ERR +ERR +ERR +380 +ERR +OK +OK +ERR +ERR +ERR +ERR +FAIL +OK +ERR +ERR +OK +ERR +FAIL +FAIL +OK +665 +ERR +ERR +ERR +ERR +OK +OK +ERR +ERR +OK +ERR +FAIL +FAIL +ERR +ERR diff --git a/network-connection/main.cpp b/network-connection/main.cpp new file mode 100644 index 0000000..e0a51e8 --- /dev/null +++ b/network-connection/main.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include + +using namespace std; + +bool validate_addr(const string &addr) { + if (addr.size() > 22) return false; + int ip_parts[4]; + int port; + sscanf(addr.c_str(), "%d.%d.%d.%d:%d", &ip_parts[0], &ip_parts[1], &ip_parts[2], &ip_parts[3], &port); + char out[35]; + sprintf(out, "%d.%d.%d.%d:%d", ip_parts[0], ip_parts[1], ip_parts[2], ip_parts[3], port); + if (strlen(out) != addr.size()) return false; // Leading 0 + + if (port > 65536 || port < 0) return false; + + for (int ip_part: ip_parts) { + if (ip_part > 256 || ip_part < 0) return false; + } + + return true; +} + +int main() { + int n; + map servers; + cin >> n; + for (int i = 0; i < n; i++) { + string mode, t; + cin >> mode >> t; + + if (!validate_addr(t)) { + cout << "ERR" << endl; + continue; + } + + if (mode == "Server") { + if (servers.find(t) == servers.end()) { + // Not found, good to go + servers[t] = i + 1; + cout << "OK" << endl; + } else { + cout << "FAIL" << endl; + } + } + if (mode == "Client") { + if (servers.find(t) == servers.end()) { + cout << "FAIL" << endl; + } else { + cout << servers[t] << endl; + } + } + } +} \ No newline at end of file diff --git a/second-large-number/data.in b/second-large-number/data.in new file mode 100644 index 0000000..06224db --- /dev/null +++ b/second-large-number/data.in @@ -0,0 +1,2 @@ +100 +40 32 2 42 47 7 24 14 11 7 19 3 44 49 44 32 4 28 4 48 4 7 41 32 42 41 27 4 20 40 44 30 13 44 8 10 16 46 50 18 20 15 4 32 22 25 10 2 17 10 49 4 47 10 41 28 3 3 26 22 13 40 29 14 9 1 43 21 19 20 10 12 40 6 14 9 14 46 25 50 17 45 1 30 5 37 8 5 47 43 39 12 25 1 40 20 2 10 14 21 diff --git a/second-large-number/main.cc b/second-large-number/main.cc new file mode 100644 index 0000000..9a81471 --- /dev/null +++ b/second-large-number/main.cc @@ -0,0 +1,24 @@ +#include +#include +#include +using namespace std; +int main() { + int k; + cin >> k; + vector arr; + for (int i = 0; i < k; i++) { + int t; + cin >> t; + arr.push_back(t); + } + auto ptr = unique(arr.begin(), arr.end()); + arr.erase(ptr, arr.end()); + if (arr.size() <= 2) { + cout << -1 << endl; + return 0; + } + sort(arr.begin(), arr.end()); + arr.insert(arr.begin(), 1, 0); + auto kp = arr.size()-1; + cout << max(arr[kp - 2], arr[kp] % arr[kp - 1]) << endl; +}