Case 1: 46171202
Case 2: 52200996
Case 3: 30634467
Case 4: 3543172
Case 5: 40482095
Case 6: 16243459
Case 7: 126640107
Case 8: 166619411
Case 9: 49494074
Case 10: 71706792
Case 11: 76943396
Case 12: 6483893
Case 13: 27324751
Case 14: 10493259
Case 15: 135962796
Case 16: 6188874
Case 17: 161616090
Case 18: 7657520
Case 19: 32383350
Case 20: 12882320
Case 21: 23472318
Case 22: 20021957
Case 23: 8395631
Case 24: 7333986
Case 25: 11217896
Case 26: 84516733
Case 27: 60072836
Case 28: 86521839
Case 29: 54745710
Case 30: 8878860
Case 31: 131906952
Case 32: 17228132
Case 33: 17628083
Case 34: 10194314
Case 35: 42823689
Case 36: 3114972
Case 37: 24365793
Case 38: 17418048
Case 39: 65881562
Case 40: 48174729
Case 41: 61494310
Case 42: 35457617
Case 43: 30988811
Case 44: 16896940
Case 45: 44524070
Case 46: 82603470
Case 47: 45932048
Case 48: 228017
Case 49: 26885119
Case 50: 16277003
Case 51: 63154542
Case 52: 15504444
Case 53: 21348303
Case 54: 6152100
Case 55: 20877624
Case 56: 174830839
Case 57: 29228340
Case 58: 3033498
Case 59: 61059703
Case 60: 50275466
Case 61: 107070127
Case 62: 19412862
Case 63: 17858866
Case 64: 4943747
Case 65: 86530223
Case 66: 36284661
Case 67: 32735032
Case 68: 56044037
Case 69: 58672860
Case 70: 17927926
Case 71: 8245210
Case 72: 52583856
Case 73: 26271983
Case 74: 18625680
Case 75: 63348731
Case 76: 2747443
Case 77: 47875955
Case 78: 110052762
Case 79: 21693968
Case 80: 32871606
Case 81: 32260746
Case 82: 1157179
Case 83: 45559599
Case 84: 14643724
Case 85: 30426617
Case 86: 36807633
Case 87: 2378113
Case 88: 87005853
Case 89: 56916546
Case 90: 37317557
Case 91: 16573487
Case 92: 74191838
Case 93: 96206178
Case 94: 51567376
Case 95: 58947171
Case 96: 56902032
Case 97: 51993783
Case 98: 1062165
Case 99: 38769871
Case 100: 1400829
It's a mess....shitty thing...the graph is actually inverted. I mean the x-axis labeled is the traditional y-axis and the y-axis is the traditional x-axis. Very easy problem but it took me some time to solve this just because of this inversion thing.
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson
Case 1: 46171202
Case 2: 52200996
Case 3: 30634467
Case 4: 3543172
Case 5: 40482095
Case 6: 16243459
Case 7: 126640107
Case 8: 166619411
Case 9: 49494074
Case 10: 71706792
Case 11: 76943396
Case 12: 6483893
Case 13: 27324751
Case 14: 10493259
Case 15: 135962796
Case 16: 6188874
Case 17: 161616090
Case 18: 7657520
Case 19: 32383350
Case 20: 12882320
Case 21: 23472318
Case 22: 20021957
Case 23: 8395631
Case 24: 7333986
Case 25: 11217896
Case 26: 84516733
Case 27: 60072836
Case 28: 86521839
Case 29: 54745710
Case 30: 8878860
Case 31: 131906952
Case 32: 17228132
Case 33: 17628083
Case 34: 10194314
Case 35: 42823689
Case 36: 3114972
Case 37: 24365793
Case 38: 17418048
Case 39: 65881562
Case 40: 48174729
Case 41: 61494310
Case 42: 35457617
Case 43: 30988811
Case 44: 16896940
Case 45: 44524070
Case 46: 82603470
Case 47: 45932048
Case 48: 228017
Case 49: 26885119
Case 50: 16277003
Case 51: 63154542
Case 52: 15504444
Case 53: 21348303
Case 54: 6152100
Case 55: 20877624
Case 56: 174830839
Case 57: 29228340
Case 58: 3033498
Case 59: 61059703
Case 60: 50275466
Case 61: 107070127
Case 62: 19412862
Case 63: 17858866
Case 64: 4943747
Case 65: 86530223
Case 66: 36284661
Case 67: 32735032
Case 68: 56044037
Case 69: 58672860
Case 70: 17927926
Case 71: 8245210
Case 72: 52583856
Case 73: 26271983
Case 74: 18625680
Case 75: 63348731
Case 76: 2747443
Case 77: 47875955
Case 78: 110052762
Case 79: 21693968
Case 80: 32871606
Case 81: 32260746
Case 82: 1157179
Case 83: 45559599
Case 84: 14643724
Case 85: 30426617
Case 86: 36807633
Case 87: 2378113
Case 88: 87005853
Case 89: 56916546
Case 90: 37317557
Case 91: 16573487
Case 92: 74191838
Case 93: 96206178
Case 94: 51567376
Case 95: 58947171
Case 96: 56902032
Case 97: 51993783
Case 98: 1062165
Case 99: 38769871
Case 100: 1400829
Sorry to say...some of your case is not valid..like case 2.case 6 & case 8.... there can be more..but I didn't check... In those cases we can't go from source to destination... as they are directed... if you draw until these points come,you will see your destination point will come first,then the source point... but it'll never given in judge's input... I just ignored such kinds of inputs & got accepted too....
Last edited by Mukit Chowdhury on Thu Nov 28, 2013 9:07 am, edited 1 time in total.