Compute differences in the prior experience of employees - stata

I have the following dataset:
clear
input float(department employee expertise_area share)
1 56 334 1
1 143 389 .04
1 143 334 .18
1 143 383 .02
1 143 398 .1
1 143 414 .02
1 143 396 .08
1 143 385 .08
1 143 403 .3
1 143 409 .02
1 143 373 .02
1 143 392 .06
1 143 397 .06
1 143 394 .02
1 214 373 1
4 145 399 .029
4 145 409 .7681
4 145 311 .0145
4 145 403 .1884
4 161 62 .4
4 161 373 .6
4 285 355 .5333
4 285 392 .0333
4 285 304 .0333
4 285 310 .2333
4 285 73 .0333
4 285 331 .0333
4 285 399 .0333
4 285 414 .0667
186 161 62 .4
186 161 373 .6
186 247 409 .0025
186 247 311 .0025
186 247 338 .25
186 247 298 .0051
186 247 334 .649
186 247 337 .0051
186 247 404 .0076
186 247 339 .0051
186 247 301 .0025
186 247 403 .0631
186 247 347 .0025
186 247 336 .0051
186 285 304 .0333
186 285 399 .0333
186 285 355 .5333
186 285 392 .0333
186 285 310 .2333
186 285 73 .0333
186 285 414 .0667
186 285 331 .0333
end
I would like to compute the differences between the distribution of the prior experience of employees in a team (or department).
This is the mean Euclidean distance, which calculates that separation of individuals in a team:
Here, p_ij and p_kj are the share of employee i’s or k’s expertise in area j over his career and n equals the team size.
For example, for department 1, employee 143, he has worked 18% of his career on area 334 (this example corresponds to observation 3). The team size for department 1 is 3, that is for department 1, n=3.
In summary, I want to calculate the Euclidean distance for each department (1, 4, 186) for 3 points (or employees) each [(56, 143, 214), (145, 161, 285), (161, 247, 285) respectively] with 13, 13 and 22 dimensions (or expertise_area) respectively. Note that I should be able to produce output even if a department has more than 3 employees (or points).
The output should look as follows:
+------------+--------------------+
| department | euclidean_distance |
+------------+--------------------+
| 1 | .4022 |
| 4 | .4131 |
| 186 | .3882 |
+------------+--------------------+
How can I compute this in Stata?

Related

AVX512 Vectorizing Modulo Gives Negative Result For Very Large Inputs

I am currently trying to vectorize a modulo calculation using AVX512.
Because there is no AVX modulo operation (except SVML) or an integer division, I am using the following formula d % p = d - int(float(d)/float(p))*p.
However, for very large inputs, I get negative results.
#include <bits/stdc++.h>
#include <immintrin.h>
int main() {
const auto SIZE = 1024;
int64_t input[SIZE];
int64_t output[SIZE] = {};
const auto p = 1'536; // 1.5 * 1024
std::iota(input, input + SIZE, 15596705878733779060ULL);
__m512i _divider_512 = _mm512_set1_epi64(p);
for (size_t idx = 0; idx < SIZE; idx += 8) {
__m512i _inputs = _mm512_loadu_si512(&input[idx]);
__m512i _e = _mm512_cvt_roundpd_epi64(_mm512_div_pd(_mm512_cvtepi64_pd(_inputs), _mm512_cvtepi64_pd(_divider_512)), _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
__m512i _mult = _mm512_mullo_epi64(_e, _divider_512);
__m512i _modulo_result = _mm512_sub_epi64(_inputs, _mult);
_mm512_storeu_si512(&output[idx], _modulo_result);
}
for (auto i = 0; i< SIZE; ++i) {
std::cout << output[i] << std::endl;
}
}
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
-255
-254
-253
-252
-251
-250
-249
-248
-247
-246
-245
-244
-243
-242
-241
-240
-239
-238
-237
-236
-235
-234
-233
-232
-231
-230
-229
-228
-227
-226
-225
-224
-223
-222
-221
-220
-219
-218
-217
-216
-215
-214
-213
-212
-211
-210
-209
-208
-207
-206
-205
-204
-203
-202
-201
-200
-199
-198
-197
-196
-195
-194
-193
-192
-191
-190
-189
-188
-187
-186
-185
-184
-183
-182
-181
-180
-179
-178
-177
-176
-175
-174
-173
-172
-171
-170
-169
-168
-167
-166
-165
-164
-163
-162
-161
-160
-159
-158
-157
-156
-155
-154
-153
-152
-151
-150
-149
-148
-147
-146
-145
-144
-143
-142
-141
-140
-139
-138
-137
-136
-135
-134
-133
-132
-131
-130
-129
-128
-127
-126
-125
-124
-123
-122
-121
-120
-119
-118
-117
-116
-115
-114
-113
-112
-111
-110
-109
-108
-107
-106
-105
-104
-103
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
Is this a rounding error between ints and doubles? Or am I missing something else?
And how could I workaround it?

What should I use to read integers from a file

Hi I am a beginner in programming, and I want to read many integers distributed in row and columns, and how many integer is there. Whenever I try infile>>x it just take the first value.
I would appreciate it so much ,if you can just explain how can you do it to me.
the file looks like this:(much longer but I want you to get the idea):
41 467 334 500 169 724 478 358 962 464 705 145 281 827 961 491 995 942 827 436 391 604 902 153 292 382 421 716 718 895 447 726 771 538 869 912 667 299 35 894 703 811 322 333 673 664 141 711 253 868 547 644 662 757 37 859 723 741 529 778 316 35 190 842 288 106 40 942 264 648 446 805 890 729 370 350 6 101 393 548 629 623 84 954 756 840 966 376 931 308 944 439 626 323 537 538 118 82 929 541 833 115 639 658 704 930 977 306 673 386 21 745 924 72 270 829 777 573 97 512 986 290 161 636 355 767 655 574 31 52 350 150 941 724 966 430 107 191 7 337 457 287 753 383 945 909 209 758 221 588 422 946 506 30 413 168 900 591 762 655 410 359 624 537 548 483 595 41 602 350 291 836 374 20 596 21 348 199 668 484 281 734 53 999 418 938 900 788 127 467 728 893 648 483 807 421 310 617 813 514 309 616 935 451 600 249 519 556 798 303 224 8 844 609 989 702 195 485 93 343 523 587 314 503 448 200 458 618 580 796 798 281 589 798 9 157 472 622 538 292 38 179 190 657 958 191 815 888 156 511 202 634 272 55 328 646 362 886 875 433 869 142 844 416 881 998 322 651 21 699 557 476 892 389 75 712 600 510 3 869 861 688 401 789 255 423 2 585 182 285 88 426 617 757 832 932 169 154 721 189 976 329 368 692 425 555 434 549 441 512 145 60 718 753 139 423 279 996 687 529 549 437 866 949 193 195 297 416 286 105 488 282 455 734 114 701 316 671 786 263 313 355 185 53 912 808 832 945 313 756 321 558 646 982 481 144 196 222 129 161 535 450 173 466 44 659 292 439 253 24 154 510 745 649 186 313 474 22 168 18 787 905 958 391 202 625 477 414 314 824 334 874 372 159 833 70 487 297 518 177 773 270 763 668 192 985 102 480 213 627 802 99 527 625 543 924 23 972 61 181 3 432 505 593 725 31 492 142 222 286 64 900 187 360 413 974 270 170 235 833 711 760 896 667 285 550 140 694 695 624 19 125 576 694 658 302 371 466 678 593 851 484 18 464 119 152 800 87 60 926 10 757 170 315 576
Try using a while to loop through every integer in the file:
while(infile>>x) {
// Do something with the integer
}
Note that if you want it in a 2 dimensional array of rows and columns, you could do something more elaborate like this using a std::stringstream:
#include <sstream>
#include <string>
//...
std::vector<std::vector<int>> result;
std::string tmp;
while(getline(infile,tmp)) {
stringstream stream;
stream << tmp;
// add new row
std::vector<int> row;
while (ss >> x) {
// add x to the new row
}
result.push_back(row);
}

Different output for the same input data

Why does this code return 10 on the test machine for the input data:
5
4 2 3 3 3
while on my PC it correctly returns 12?
#include <iostream>
#include <cstdlib>
using namespace std;
int n;
int b[99];
int money = 0;
int min()
{
int min = b[0];
int index = 0;
for (int i = 1; i < n; i++)
if (b[i] < min && b[i] % 2 != 0) {
min = b[i];
index = i;
}
for (int i = index; i < n - 1; i++)
{
b[i] = b[i + 1];
}
b[n - 1] = 0;
return min;
}
int main()
{
money = 0;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> b[i];
money += b[i];
}
while (money % 2 != 0)
{
money -= min();
}
if (money % 2 == 0)
if (money != 0)
cout << money;
else cout << "NIESTETY";
system("pause");
}
Thanks!
Edit: It happened on my PC too, once. But for other input data it works perfectly. And i'm not talking about some simple values. I've run some recommended tests for this problem, this for example:
581
906 369 899 998 73 717 269 51 875 61 123 237 50 924 576 52 693 394 952 24 534 452 634 139 642 570 20 643 128 165 144 867 86 256 981 26 344 912 489 524 667 375 502 944 961 61 586 834 62 240 644 602 563 758 587 973 440 920 977 785 999 186 384 231 414 184 84 492 277 787 737 312 849 595 238 892 377 103 275 797 847 652 263 526 473 643 972 701 209 70 95 852 337 387 651 451 843 649 445 172 592 299 110 479 191 148 324 600 928 258 354 693 522 637 977 180 394 306 846 885 85 339 678 355 799 297 232 929 133 173 698 362 592 426 319 690 195 944 143 571 831 765 847 106 293 460 650 4 876 891 272 987 171 767 495 486 161 243 959 431 707 761 634 574 774 176 84 903 102 223 7 759 886 113 626 917 873 177 307 46 56 415 162 537 845 956 704 725 551 266 673 255 567 520 278 1000 450 573 205 447 656 946 460 331 317 125 340 372 246 635 667 642 422 766 669 894 217 759 396 160 985 46 61 832 375 272 276 49 820 440 259 482 569 97 903 135 164 570 412 320 827 403 610 577 350 543 328 481 136 595 584 935 830 134 587 658 604 865 742 111 668 313 669 233 592 451 735 539 890 319 882 674 306 376 945 313 872 683 915 92 954 598 750 106 576 259 563 293 158 708 716 259 434 833 867 754 678 576 981 55 8 421 31 176 641 707 175 531 299 65 55 118 990 696 533 713 829 20 310 201 748 697 397 550 909 584 366 6 515 298 128 483 454 564 986 171 225 35 733 664 368 674 146 479 70 610 734 708 550 962 227 606 520 751 449 254 6 253 757 942 63 926 592 768 516 843 187 836 722 329 745 54 703 437 671 463 288 548 847 563 354 964 27 100 120 351 928 557 757 937 872 417 18 335 181 68 834 994 83 178 67 45 965 31 976 155 883 726 173 813 66 199 211 619 429 643 237 464 586 929 546 675 392 350 811 187 936 64 167 394 969 36 630 430 377 905 283 36 352 221 293 125 975 214 903 622 769 955 759 83 104 988 876 612 308 495 612 634 288 581 164 595 685 620 817 988 355 134 71 159 493 730 952 70 620 961 407 78 159 660 542 991 858 101 140 531 156 667 323 621 365 193 825 252 848 897 5 16 277 461 909 549 194 638 422 718 979 705 515 499 488 447 249 229 382 315 851 625 249 818 889 580 224 926 270 734 689 275 842 834 838 774 949 101 728 930 478 397 188 228 675 36 259 834 745 629 374 664 335 30 745 963 918 38 848 482 739 745 912 154 408 250 271 480 767 120 142 652 169 764 541 228 919 482 984 942 631 46 529 395 576
//Output: 289826

How to print a list of number, with 5 numbers in each row, in Clojure?

Suppose I have this list of prime (totally 100):
(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541)
I want to print them in rows, with 5 numbers each row:
( 2 3 5 7 11
13 17 19 23 29
31 37 41 43 47
....
(Please note that the numbers in column are right aligned.)
This is based on another answer above.
(require '[clojure.string :as string])
user=> (println
(str \(
(string/join "\n "
(map #(apply format "%3d %3d %3d %3d %3d" %)
(partition 5 primes)))
\)))
( 2 3 5 7 11
13 17 19 23 29
31 37 41 43 47
53 59 61 67 71
73 79 83 89 97
101 103 107 109 113
127 131 137 139 149
151 157 163 167 173
179 181 191 193 197
199 211 223 227 229
233 239 241 251 257
263 269 271 277 281
283 293 307 311 313
317 331 337 347 349
353 359 367 373 379
383 389 397 401 409
419 421 431 433 439
443 449 457 461 463
467 479 487 491 499
503 509 521 523 541)

How to fix this round-off error?

Apologies for the long code. This is as far as I could reduce it.
#include <QtGui/QApplication>
#include <QtGui/QWidget>
#include <QtGui/QImage>
#include <QtGui/QPainter>
#include <vector>
using namespace std;
class View : public QWidget {
typedef pair<double, double> Point;
unsigned char* _buffer;
double centerx, centery, scale;
double xmin, xmax, ymin, ymax;
double xprec, yprec;
double xratio, yratio;
double fwidth, fheight;
double xlen, ylen;
int width;
int height;
public:
View(int w, int h) : width(w), height(h) {
_buffer = new unsigned char[4 * w * h];
fwidth = static_cast<double>(width);
fheight = static_cast<double>(height);
double aspectRatio = fwidth / fheight;
centerx = 0;
centery = 0;
scale = 2.3;
xlen = aspectRatio * scale;
ylen = 1.0 * scale;
xmin = -(xlen * 0.5) + centerx;
xmax = -xmin;
ymin = -(ylen * 0.5) + centery;
ymax = -ymin;
xprec = xlen / fwidth;
yprec = ylen / fheight;
xratio = fwidth / scale / aspectRatio;
yratio = fheight / scale;
}
double roundX(double x) { return std::floor(x / xprec) * xprec; }
double roundY(double y) { return std::floor(y / yprec) * yprec; }
protected:
void paintEvent(QPaintEvent* event) {
QPainter painter(this);
render();
painter.drawImage(
QPoint(0, 0),
QImage(_buffer, width, height, QImage::Format_RGB32));
}
private:
void render() {
memset(_buffer, 0, 4 * width * height);
for (double i = xmin; i < xmax; i += xprec) {
for (double j = ymin; j < ymax; j += yprec) {
Point p(roundX(i), roundY(j));
int x = static_cast<int>((p.first * xratio) - (xmin * xratio) );
int y = static_cast<int>((p.second * yratio) - (ymin * yratio) );
_buffer[4 * (x * width + y) ] = 255;
_buffer[4 * (x * width + y) + 1] = 255;
_buffer[4 * (x * width + y) + 2] = 255;
}
}
}
};
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
View view(512, 512);
view.show();
return app.exec();
}
The code, instead of producing a white window, produces a white window with lines which are the result of round-off error. I think the source of the problem are roundX() and roundY() functions, but I'm not sure. I also don't know how to fix this. Any ideas?
I don't have Qt and I prefer C. So, below is a C program that imitates your render() in render1() and has a corrected implementation in render2().
The main problem of your render() is that it uses prematurely rounded values from Point p(roundX(i), roundY(j));. If you use unrounded i and j, things will improve dramatically, but you're still going to suffer from the rounding errors of your additions, multiplications and so on.
But those rounding errors aren't large and they don't accumulate to a large error in the end. So, the final correction is the addition of .5 prior to conversion to the integers x and y. Without it, the floating point value can be slightly less than the nearest integer that you want to get and when you convert this double into int, you get a value that is one less.
#include <stdio.h>
#include <string.h>
#include <math.h>
double centerx, centery, scale;
double xmin, xmax, ymin, ymax;
double xprec, yprec;
double xratio, yratio;
double fwidth, fheight;
double xlen, ylen;
int width;
int height;
void InitView(int w, int h)
{
double aspectRatio;
width = w; height = h;
// _buffer = new unsigned char[4 * w * h];
fwidth = width;
fheight = height;
aspectRatio = fwidth / fheight;
centerx = 0;
centery = 0;
scale = 2.3;
xlen = aspectRatio * scale;
ylen = 1.0 * scale;
xmin = -(xlen * 0.5) + centerx;
xmax = -xmin;
ymin = -(ylen * 0.5) + centery;
ymax = -ymin;
xprec = xlen / fwidth;
yprec = ylen / fheight;
xratio = fwidth / scale / aspectRatio;
yratio = fheight / scale;
}
double roundX(double x) { return floor(x / xprec) * xprec; }
double roundY(double y) { return floor(y / yprec) * yprec; }
void render1(void)
{
double i, j;
int cnt;
char usedx[1 + 512 + 1];
char usedy[1 + 512 + 1];
printf("render1():\n");
memset(usedx, 0, sizeof usedx);
memset(usedy, 0, sizeof usedy);
printf("x's:\n");
for (cnt = 0, i = xmin; i < xmax; i += xprec)
{
int x = ((roundX(i) * xratio) - (xmin * xratio));
printf("%d ", x);
cnt++;
usedx[1 + x] = 1;
}
printf("\ncount: %d\n", cnt);
for (cnt = 1; cnt <= 512; cnt++)
if (!usedx[cnt])
printf("missing x: %d\n", cnt - 1);
printf("y's:\n");
for (cnt = 0, j = ymin; j < ymax; j += yprec)
{
int y = ((roundY(j) * yratio) - (ymin * yratio));
printf("%d ", y);
cnt++;
usedy[1 + y] = 1;
}
printf("\ncount: %d\n", cnt);
for (cnt = 1; cnt <= 512; cnt++)
if (!usedy[cnt])
printf("missing y: %d\n", cnt - 1);
}
void render2(void)
{
double i, j;
int cnt;
char usedx[1 + 512 + 1];
char usedy[1 + 512 + 1];
printf("render2():\n");
memset(usedx, 0, sizeof usedx);
memset(usedy, 0, sizeof usedy);
printf("x's:\n");
for (cnt = 0, i = xmin; i < xmax; i += xprec)
{
int x = ((i * xratio) - (xmin * xratio) + .5);
printf("%d ", x);
cnt++;
usedx[1 + x] = 1;
}
printf("\ncount: %d\n", cnt);
for (cnt = 1; cnt <= 512; cnt++)
if (!usedx[cnt])
printf("missing x: %d\n", cnt - 1);
printf("y's:\n");
for (cnt = 0, j = ymin; j < ymax; j += yprec)
{
int y = ((j * yratio) - (ymin * yratio) + .5);
printf("%d ", y);
cnt++;
usedy[1 + y] = 1;
}
printf("\ncount: %d\n", cnt);
for (cnt = 1; cnt <= 512; cnt++)
if (!usedy[cnt])
printf("missing y: %d\n", cnt - 1);
}
int main(void)
{
InitView(512, 512);
render1();
render2();
return 0;
}
Output (ideone):
render1():
x's:
0 0 0 2 2 4 5 5 7 7 9 10 10 12 12 14 15 15 17 17 19 20 20 22 22 24 25 25 27 27 29 30 30 32 32 33 35 36 36 37 38 40 41 41 42 43 45 46 46 47 48 50 51 51 52 54 55 56 56 57 59 60 61 61 62 64 65 66 66 67 69 70 71 71 72 74 75 76 76 77 79 80 81 81 82 84 85 86 86 87 89 90 91 91 92 94 95 95 96 97 99 100 100 101 103 104 105 105 106 108 109 110 110 111 113 114 115 115 116 118 119 120 120 121 123 124 125 125 126 128 129 130 130 131 133 134 135 135 136 138 139 140 140 141 143 144 145 146 146 148 148 150 151 152 153 153 155 156 157 158 158 160 162 163 163 165 166 167 168 168 170 171 172 173 174 175 175 177 178 179 180 180 182 183 184 185 185 187 188 189 190 190 192 193 194 195 195 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 371 373 374 375 376 376 378 379 380 381 381 383 384 385 386 386 388 389 390 391 391 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 420 422 423 424 425 425 427 428 429 430 430 432 433 434 435 435 437 438 439 440 440 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 479 481 482 482 484 484 486 487 487 489 489 491 492 492 494 495 496 497 497 499 500 501 502 502 504 505 506 507 507 509 510 511
count: 512
missing x: 1
missing x: 3
missing x: 6
missing x: 8
missing x: 11
missing x: 13
missing x: 16
missing x: 18
missing x: 21
missing x: 23
missing x: 26
missing x: 28
missing x: 31
missing x: 34
missing x: 39
missing x: 44
missing x: 49
missing x: 53
missing x: 58
missing x: 63
missing x: 68
missing x: 73
missing x: 78
missing x: 83
missing x: 88
missing x: 93
missing x: 98
missing x: 102
missing x: 107
missing x: 112
missing x: 117
missing x: 122
missing x: 127
missing x: 132
missing x: 137
missing x: 142
missing x: 147
missing x: 149
missing x: 154
missing x: 159
missing x: 161
missing x: 164
missing x: 169
missing x: 176
missing x: 181
missing x: 186
missing x: 191
missing x: 196
missing x: 372
missing x: 377
missing x: 382
missing x: 387
missing x: 392
missing x: 421
missing x: 426
missing x: 431
missing x: 436
missing x: 441
missing x: 480
missing x: 483
missing x: 485
missing x: 488
missing x: 490
missing x: 493
missing x: 498
missing x: 503
missing x: 508
y's:
0 0 0 2 2 4 5 5 7 7 9 10 10 12 12 14 15 15 17 17 19 20 20 22 22 24 25 25 27 27 29 30 30 32 32 33 35 36 36 37 38 40 41 41 42 43 45 46 46 47 48 50 51 51 52 54 55 56 56 57 59 60 61 61 62 64 65 66 66 67 69 70 71 71 72 74 75 76 76 77 79 80 81 81 82 84 85 86 86 87 89 90 91 91 92 94 95 95 96 97 99 100 100 101 103 104 105 105 106 108 109 110 110 111 113 114 115 115 116 118 119 120 120 121 123 124 125 125 126 128 129 130 130 131 133 134 135 135 136 138 139 140 140 141 143 144 145 146 146 148 148 150 151 152 153 153 155 156 157 158 158 160 162 163 163 165 166 167 168 168 170 171 172 173 174 175 175 177 178 179 180 180 182 183 184 185 185 187 188 189 190 190 192 193 194 195 195 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 371 373 374 375 376 376 378 379 380 381 381 383 384 385 386 386 388 389 390 391 391 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 420 422 423 424 425 425 427 428 429 430 430 432 433 434 435 435 437 438 439 440 440 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 479 481 482 482 484 484 486 487 487 489 489 491 492 492 494 495 496 497 497 499 500 501 502 502 504 505 506 507 507 509 510 511
count: 512
missing y: 1
missing y: 3
missing y: 6
missing y: 8
missing y: 11
missing y: 13
missing y: 16
missing y: 18
missing y: 21
missing y: 23
missing y: 26
missing y: 28
missing y: 31
missing y: 34
missing y: 39
missing y: 44
missing y: 49
missing y: 53
missing y: 58
missing y: 63
missing y: 68
missing y: 73
missing y: 78
missing y: 83
missing y: 88
missing y: 93
missing y: 98
missing y: 102
missing y: 107
missing y: 112
missing y: 117
missing y: 122
missing y: 127
missing y: 132
missing y: 137
missing y: 142
missing y: 147
missing y: 149
missing y: 154
missing y: 159
missing y: 161
missing y: 164
missing y: 169
missing y: 176
missing y: 181
missing y: 186
missing y: 191
missing y: 196
missing y: 372
missing y: 377
missing y: 382
missing y: 387
missing y: 392
missing y: 421
missing y: 426
missing y: 431
missing y: 436
missing y: 441
missing y: 480
missing y: 483
missing y: 485
missing y: 488
missing y: 490
missing y: 493
missing y: 498
missing y: 503
missing y: 508
render2():
x's:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
count: 512
y's:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
count: 512